1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
use *;
use ;
// Primitive procedures
// -------------------------------------------------------------------
// Derivative of [std::ops::Add].
combined_derivative_macro!;
// Derivative of [std::ops::Sub].
combined_derivative_macro!;
// Derivative of [std::ops::Mul].
combined_derivative_macro!;
// Derivative of [std::ops::Div].
combined_derivative_macro!;
// Exponent procedures
// -------------------------------------------------------------------
// Derivative of [`powi`](https://doc.rust-lang.org/std/primitive.f32.html#method.powi).
combined_derivative_macro!;
// Derivative of [`powf`](https://doc.rust-lang.org/std/primitive.f32.html#method.powf)
combined_derivative_macro!;
// Derivative of [`sqrt`](https://doc.rust-lang.org/std/primitive.f32.html#method.sqrt).
combined_derivative_macro!;
// Derivative of [`cbrt`](https://doc.rust-lang.org/std/primitive.f32.html#method.cbrt).
combined_derivative_macro!;
// Derivative of [`exp`](https://doc.rust-lang.org/std/primitive.f32.html#method.exp).
combined_derivative_macro!;
// Derivative of [`exp2`](https://doc.rust-lang.org/std/primitive.f32.html#method.exp2).
combined_derivative_macro!;
// Derivative of [`exp_m1`](https://doc.rust-lang.org/std/primitive.f32.html#method.exp_m1).
combined_derivative_macro!;
// Log procedures
// -------------------------------------------------------------------
// Derivative of [`ln`](https://doc.rust-lang.org/std/primitive.f32.html#method.ln).
combined_derivative_macro!;
// Derivative of [`ln_1p`](https://doc.rust-lang.org/std/primitive.f32.html#method.ln_1p).
combined_derivative_macro!;
// Derivative of [`log`](https://doc.rust-lang.org/std/primitive.f32.html#method.log).
combined_derivative_macro!;
// Derivative of [`log10`](https://doc.rust-lang.org/std/primitive.f32.html#method.log10).
combined_derivative_macro!;
// Derivative of [`log2`](https://doc.rust-lang.org/std/primitive.f32.html#method.log2).
combined_derivative_macro!;
// Trig procedures
// -------------------------------------------------------------------
// Derivative of [`acos`](https://doc.rust-lang.org/std/primitive.f32.html#method.acos).
combined_derivative_macro!;
// Derivative of [`acosh`](https://doc.rust-lang.org/std/primitive.f32.html#method.acosh).
combined_derivative_macro!;
// Derivative of [`asin`](https://doc.rust-lang.org/std/primitive.f32.html#method.asin).
combined_derivative_macro!;
// Derivative of [`asinh`](https://doc.rust-lang.org/std/primitive.f32.html#method.asinh).
combined_derivative_macro!;
// Derivative of [`atan`](https://doc.rust-lang.org/std/primitive.f32.html#method.atan).
combined_derivative_macro!;
// Derivative of [`sin`](https://doc.rust-lang.org/std/primitive.f32.html#method.sin).
combined_derivative_macro!;
// Derivative of [`atanh`](https://doc.rust-lang.org/std/primitive.f32.html#method.atanh).
combined_derivative_macro!;
// Derivative of [`cos`](https://doc.rust-lang.org/std/primitive.f32.html#method.cos).
combined_derivative_macro!;
// Derivative of [`cosh`](https://doc.rust-lang.org/std/primitive.f32.html#method.cosh).
combined_derivative_macro!;
// Derivative of [`sinh`](https://doc.rust-lang.org/std/primitive.f32.html#method.sinh).
combined_derivative_macro!;
// Derivative of [`tan`](https://doc.rust-lang.org/std/primitive.f32.html#method.tan).
combined_derivative_macro!;
// Derivative of [`tanh`](https://doc.rust-lang.org/std/primitive.f32.html#method.tanh).
// combined_derivative_macro!(tanh_f32, "0f32","1f32 / ({base}.cosh()*{base}.cosh())");
// TODO Add atan2 (https://doc.rust-lang.org/std/primitive.f32.html#method.atan2)
// TODO Add sin_cos (https://doc.rust-lang.org/std/primitive.f32.html#method.sin_cos)
// Misc procedures
// -------------------------------------------------------------------
// Derivative of [`abs`](https://doc.rust-lang.org/std/primitive.f32.html#method.abs).
combined_derivative_macro!;
// Derivative of [`recip`](https://doc.rust-lang.org/std/primitive.f32.html#method.recip).
combined_derivative_macro!;
// TODO For the below functions, I do not think the given derivatives are entirely accurate.
// Derivative of [`ceil`](https://doc.rust-lang.org/std/primitive.f32.html#method.ceil).
combined_derivative_macro!;
// Derivative of [`floor`](https://doc.rust-lang.org/std/primitive.f32.html#method.floor).
combined_derivative_macro!;
// Derivative of [`fract`](https://doc.rust-lang.org/std/primitive.f32.html#method.fract).
combined_derivative_macro!;
// Derivative of [`round`](https://doc.rust-lang.org/std/primitive.f32.html#method.round).
combined_derivative_macro!;
// TODO Add some of these procedures here:
// - clamp https://doc.rust-lang.org/std/primitive.f32.html#method.clamp
// - div_eculid https://doc.rust-lang.org/std/primitive.f32.html#method.div_euclid
// - hypot https://doc.rust-lang.org/std/primitive.f32.html#method.hypot
// - mul_add https://doc.rust-lang.org/std/primitive.f32.html#method.mul_add
// - signum https://doc.rust-lang.org/std/primitive.f32.html#method.signum
// - rem_euclid https://doc.rust-lang.org/std/primitive.f32.html#method.rem_euclid
// - to_degrees https://doc.rust-lang.org/std/primitive.f32.html#method.to_degrees
// - to_radians https://doc.rust-lang.org/std/primitive.f32.html#method.to_radians
// - trunc https://doc.rust-lang.org/std/primitive.f32.html#method.trunc