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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
//! Bindings for Boost Math C++ library
//!
//! See [github.com/boostorg/math](https://github.com/boostorg/math) for more details.
//!
//! ## Constants
//!
//! See [`constants`] for common mathematical constants.
//!
//! ## Special Functions
//!
//! <https://boost.org/doc/libs/latest/libs/math/doc/html/special.html>
//!
//! ### Number Series
//!
//! - [ ] Bernoulli numbers
//! - [ ] Tangent numbers
//! - [x] Prime numbers
//! - [`prime`]
//! - [x] Fibonacci numbers
//! - [`fibonacci`]
//!
//! ### Gamma Functions
//!
//! - Gamma
//! - [`gamma`]
//! - [`gamma1pm1`]
//! - Log Gamma
//! - [`lgamma`]
//! - Polygamma
//! - [`digamma`]
//! - [`trigamma`]
//! - [`polygamma`]
//! - Ratios of Gamma Functions
//! - [`gamma_ratio`]
//! - [`gamma_delta_ratio`]
//! - Incomplete Gamma Functions
//! - [`gamma_q`]
//! - [`gamma_p`]
//! - [`gamma_upper`]
//! - [`gamma_lower`]
//! - Incomplete Gamma Function inverses
//! - [`gamma_q_inv`]
//! - [`gamma_q_inva`]
//! - [`gamma_p_inv`]
//! - [`gamma_p_inva`]
//! - Derivative of the Incomplete Gamma Function
//! - [`gamma_p_derivative`]
//!
//! ### Factorials and Binomial Coefficients
//!
//! - [`factorial`]
//! - [`double_factorial`]
//! - [`rising_factorial`]
//! - [`falling_factorial`]
//! - [`binomial_coefficient`]
//!
//! ### Beta Functions
//!
//! - Beta function
//! - [`beta`]
//! - Incomplete beta functions
//! - [`beta_`]
//! - [`betac`]
//! - Regularized incomplete beta functions
//! - [`ibeta`]
//! - [`ibetac`]
//! - Regularized incomplete beta function inverses
//! - [`ibeta_inv`]
//! - [`ibeta_inva`]
//! - [`ibeta_invb`]
//! - [`ibetac_inv`]
//! - [`ibetac_inva`]
//! - [`ibetac_invb`]
//! - Regularized incomplete beta function derivative
//! - [`ibeta_derivative`]
//!
//! ### Error Functions
//!
//! | Error function | Inverse function |
//! | -------------- | ---------------- |
//! | [`erf`] | [`erf_inv`] |
//! | [`erfc`] | [`erfc_inv`] |
//!
//! ### Polynomials
//!
//! - Chebyshev Polynomials
//! - [`chebyshev_t`]
//! - [`chebyshev_t_prime`]
//! - [`chebyshev_u`]
//! - [`chebyshev_next`]
//! - Legendre (and associated) polynomials
//! - [`legendre_p`]
//! - [`legendre_p_prime`]
//! - [`legendre_p_zeros`]
//! - [`legendre_q`]
//! - [`legendre_next`]
//! - [`legendre_p_assoc`]
//! - [`legendre_assoc_next`]
//! - Laguerre (and Associated) Polynomials
//! - [`laguerre`]
//! - [`laguerre_next`]
//! - [`laguerre_assoc`]
//! - [`laguerre_assoc_next`]
//! - Hermite Polynomials
//! - [`hermite_h`]
//! - [`hermite_h_derivative`]
//! - [`hermite_h_next`]
//! - [`hermite_he`]
//! - [`hermite_he_derivative`]
//! - [`hermite_he_next`]
//! - Gegenbauer Polynomials
//! - [`gegenbauer`]
//! - [`gegenbauer_derivative`]
//! - Jacobi Polynomials
//! - [`jacobi`]
//! - [`jacobi_derivative`]
//! - Spherical Harmonics
//! - [`spherical_harmonic`]
//! - [`spherical_harmonic_r`]
//! - [`spherical_harmonic_i`]
//! - Cardinal B-splines
//! - [`cardinal_b_spline`]
//! - [`cardinal_b_spline_prime`]
//! - [`cardinal_b_spline_double_prime`]
//! - [`forward_cardinal_b_spline`]
//!
//! ### Bessel and Hankel Functions
//!
//! | Type | First Kind | Second Kind |
//! | ---------------------: | ---------------- | ---------------- |
//! | Cyclic Bessel | [`cyl_bessel_j`] | [`cyl_neumann`] |
//! | Modified Cyclic Bessel | [`cyl_bessel_i`] | [`cyl_bessel_k`] |
//! | Spherical Bessel | [`sph_bessel`] | [`sph_neumann`] |
//! | Cyclic Hankel | [`cyl_hankel_1`] | [`cyl_hankel_2`] |
//! | Spherical Hankel | [`sph_hankel_1`] | [`sph_hankel_2`] |
//!
//! Note that the Hankel functions require the `num-complex` feature to be enabled.
//!
//! #### Zeros
//!
//! | Type | First Kind | Second Kind |
//! | ---------------------: | --------------------- | ---------------- |
//! | Cyclic Bessel | [`cyl_bessel_j_zero`] | [`cyl_neumann_zero`] |
//!
//! #### Derivatives
//!
//! | Type | First Kind | Second Kind |
//! | ---------------------: | ---------------------- | ---------------------- |
//! | Cyclic Bessel | [`cyl_bessel_j_prime`] | [`cyl_neumann_prime`] |
//! | Modified Cyclic Bessel | [`cyl_bessel_i_prime`] | [`cyl_bessel_k_prime`] |
//! | Spherical Bessel | [`sph_bessel_prime`] | [`sph_neumann_prime`] |
//!
//! ### Airy Functions
//!
//! | Notation | Function | First derivative | Zeros |
//! | -------- | ----------- | ----------------- | ---------------- |
//! | *Ai* | [`airy_ai`] | [`airy_ai_prime`] | [`airy_ai_zero`] |
//! | *Bi* | [`airy_bi`] | [`airy_bi_prime`] | [`airy_bi_zero`] |
//!
//! ### Elliptic Integrals
//!
//! - Elliptic Integrals - Carlson Form
//! - [`ellint_rc`] - *R<sub>C</sub>(x,y)*
//! - [`ellint_rd`] - *R<sub>D</sub>(x,y,z)*
//! - [`ellint_rf`] - *R<sub>F</sub>(x,y,z)*
//! - [`ellint_rg`] - *R<sub>G</sub>(x,y,z)*
//! - [`ellint_rj`] - *R<sub>J</sub>(x,y,z,p)*
//! - Elliptic Integrals of the First Kind - Legendre Form
//! - [`ellint_1`] - *K(k)*
//! - [`ellint_1_inc`] - *F(φ,k)*
//! - Elliptic Integrals of the Second Kind - Legendre Form
//! - [`ellint_2`] - *E(k)*
//! - [`ellint_2_inc`] - *E(φ,k)*
//! - Elliptic Integrals of the Third Kind - Legendre Form
//! - [`ellint_3`] - *Π(v,k)*
//! - [`ellint_3_inc`] - *Π(v,φ,k)*
//! - Elliptic Integral *D* - Legendre Form
//! - [`ellint_d`] - *D(k)*
//! - [`ellint_d_inc`] - *D(φ,k)*
//! - Jacobi Zeta Function
//! - [`jacobi_zeta`] - *Z(φ,k)*
//! - Heuman Lambda Function
//! - [`heuman_lambda`] - *Λ<sub>0</sub>(φ,k)*
//!
//! ### Jacobi Elliptic Functions
//!
//! - Jacobi Elliptic *SN*, *CN* and *DN*
//! - [`jacobi_elliptic`]
//! - Jacobi Elliptic Function *cd*
//! - [`jacobi_cd`]
//! - Jacobi Elliptic Function *cn*
//! - [`jacobi_cn`]
//! - Jacobi Elliptic Function *cs*
//! - [`jacobi_cs`]
//! - Jacobi Elliptic Function *dc*
//! - [`jacobi_dc`]
//! - Jacobi Elliptic Function *dn*
//! - [`jacobi_dn`]
//! - Jacobi Elliptic Function *ds*
//! - [`jacobi_ds`]
//! - Jacobi Elliptic Function *nc*
//! - [`jacobi_nc`]
//! - Jacobi Elliptic Function *nd*
//! - [`jacobi_nd`]
//! - Jacobi Elliptic Function *ns*
//! - [`jacobi_ns`]
//! - Jacobi Elliptic Function *sc*
//! - [`jacobi_sc`]
//! - Jacobi Elliptic Function *sd*
//! - [`jacobi_sd`]
//! - Jacobi Elliptic Function *sn*
//! - [`jacobi_sn`]
//!
//! ### Jacobi Theta Functions
//!
//! - Jacobi Theta Function *θ<sub>1</sub>*
//! - [`jacobi_theta_1`]
//! - [`jacobi_theta_1_tau`]
//! - Jacobi Theta Function *θ<sub>2</sub>*
//! - [`jacobi_theta_2`]
//! - [`jacobi_theta_2_tau`]
//! - Jacobi Theta Function *θ<sub>3</sub>*
//! - [`jacobi_theta_3`]
//! - [`jacobi_theta_3_tau`]
//! - [`jacobi_theta_3m1`]
//! - [`jacobi_theta_3m1_tau`]
//! - Jacobi Theta Function *θ<sub>4</sub>*
//! - [`jacobi_theta_4`]
//! - [`jacobi_theta_4_tau`]
//! - [`jacobi_theta_4m1`]
//! - [`jacobi_theta_4m1_tau`]
//!
//! ### Lambert W Function
//!
//! | Branch | Function | First derivative |
//! | -----: | --------------- | --------------------- |
//! | 0 | [`lambert_w0`] | [`lambert_w0_prime`] |
//! | -1 | [`lambert_wm1`] | [`lambert_wm1_prime`] |
//!
//! ### Zeta Functions
//!
//! - Riemann zeta function
//! - [`zeta`]
//!
//! ### Exponential Integrals
//!
//! - Exponential Integral *Ei(x)*
//! - [`expint_i`]
//! - Exponential Integral *E<sub>n</sub>(x)*
//! - [`expint_n`]
//!
//! ### Hypergeometric Functions
//!
//! - Hypergeometric *<sub>1</sub>F<sub>0</sub>*
//! - [`hypergeometric_1f0`]
//! - Hypergeometric *<sub>0</sub>F<sub>1</sub>*
//! - [`hypergeometric_0f1`]
//! - Hypergeometric *<sub>2</sub>F<sub>0</sub>*
//! - [`hypergeometric_2f0`]
//! - Hypergeometric *<sub>1</sub>F<sub>1</sub>*
//! - [`hypergeometric_1f1`]
//! - [`hypergeometric_1f1_regularized`]
//! - [`log_hypergeometric_1f1`]
//! - ~Hypergeometric *<sub>p</sub>F<sub>q</sub>*~ (not included due to bugs in Boost)
//!
//! ### Basic Functions
//!
//! - [`sin_pi`] and [`cos_pi`]
//! - [`log1p`] and [`expm1`]
//! - [`powm1`]
//! - [`rsqrt`]
//! - [`sqrt1pm1`]
//! - [`cbrt`]
//! - [`hypot`]
//! - [`logaddexp`] and [`logsumexp`]
//!
//! ### Sinus Cardinal and Hyperbolic Sinus Cardinal Functions
//!
//! - [`sinc_pi`]
//! - [`sinhc_pi`]
//!
//! ### Inverse Hyperbolic Functions
//!
//! - [`acosh`]
//! - [`asinh`]
//! - [`atanh`]
//!
//! ### Owen's T Function
//!
//! - [`owens_t`]
//!
//! ## Constexpr CMath
//!
//! See [`ccmath`]
//!
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use owens_t::*;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;