From Jason Turner

[sf.cmath]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmppvd3t7hv/{from.md → to.md} +30 -27
tmp/tmppvd3t7hv/{from.md → to.md} RENAMED
@@ -1,26 +1,28 @@
1
  ### Mathematical special functions <a id="sf.cmath">[[sf.cmath]]</a>
2
 
3
- If any argument value to any of the functions specified in this
4
- subclause is a NaN (Not a Number), the function shall return a NaN but
5
- it shall not report a domain error. Otherwise, the function shall report
6
- a domain error for just those argument values for which:
7
 
8
- - the function description’s *Returns:* clause explicitly specifies a
 
 
 
 
 
9
  domain and those argument values fall outside the specified domain, or
10
  - the corresponding mathematical function value has a nonzero imaginary
11
  component, or
12
  - the corresponding mathematical function is not mathematically
13
- defined.[^13]
14
 
15
  Unless otherwise specified, each function is defined for all finite
16
  values, for negative infinity, and for positive infinity.
17
 
18
  #### Associated Laguerre polynomials <a id="sf.cmath.assoc.laguerre">[[sf.cmath.assoc.laguerre]]</a>
19
 
20
  ``` cpp
21
- double assoc_laguerre(unsigned n, unsigned m, double x);
22
  float assoc_laguerref(unsigned n, unsigned m, float x);
23
  long double assoc_laguerrel(unsigned n, unsigned m, long double x);
24
  ```
25
 
26
  *Effects:* These functions compute the associated Laguerre polynomials
@@ -35,11 +37,11 @@ of their respective arguments `n`, `m`, and `x`.
35
  *implementation-defined* if `n >= 128` or if `m >= 128`.
36
 
37
  #### Associated Legendre functions <a id="sf.cmath.assoc.legendre">[[sf.cmath.assoc.legendre]]</a>
38
 
39
  ``` cpp
40
- double assoc_legendre(unsigned l, unsigned m, double x);
41
  float assoc_legendref(unsigned l, unsigned m, float x);
42
  long double assoc_legendrel(unsigned l, unsigned m, long double x);
43
  ```
44
 
45
  *Effects:* These functions compute the associated Legendre functions of
@@ -54,11 +56,11 @@ their respective arguments `l`, `m`, and `x`.
54
  *implementation-defined* if `l >= 128`.
55
 
56
  #### Beta function <a id="sf.cmath.beta">[[sf.cmath.beta]]</a>
57
 
58
  ``` cpp
59
- double beta(double x, double y);
60
  float betaf(float x, float y);
61
  long double betal(long double x, long double y);
62
  ```
63
 
64
  *Effects:* These functions compute the beta function of their respective
@@ -69,11 +71,11 @@ $$\mathsf{B}(x, y) = \frac{\Gamma(x) \, \Gamma(y)}{\Gamma(x + y)}
69
  \text{ ,\quad for $x > 0$,\, $y > 0$,}$$ where x is `x` and y is `y`.
70
 
71
  #### Complete elliptic integral of the first kind <a id="sf.cmath.comp.ellint.1">[[sf.cmath.comp.ellint.1]]</a>
72
 
73
  ``` cpp
74
- double comp_ellint_1(double k);
75
  float comp_ellint_1f(float k);
76
  long double comp_ellint_1l(long double k);
77
  ```
78
 
79
  *Effects:* These functions compute the complete elliptic integral of the
@@ -86,11 +88,11 @@ where k is `k`.
86
  See also [[sf.cmath.ellint.1]].
87
 
88
  #### Complete elliptic integral of the second kind <a id="sf.cmath.comp.ellint.2">[[sf.cmath.comp.ellint.2]]</a>
89
 
90
  ``` cpp
91
- double comp_ellint_2(double k);
92
  float comp_ellint_2f(float k);
93
  long double comp_ellint_2l(long double k);
94
  ```
95
 
96
  *Effects:* These functions compute the complete elliptic integral of the
@@ -103,11 +105,11 @@ where k is `k`.
103
  See also [[sf.cmath.ellint.2]].
104
 
105
  #### Complete elliptic integral of the third kind <a id="sf.cmath.comp.ellint.3">[[sf.cmath.comp.ellint.3]]</a>
106
 
107
  ``` cpp
108
- double comp_ellint_3(double k, double nu);
109
  float comp_ellint_3f(float k, float nu);
110
  long double comp_ellint_3l(long double k, long double nu);
111
  ```
112
 
113
  *Effects:* These functions compute the complete elliptic integral of the
@@ -120,11 +122,11 @@ where k is `k` and $\nu$ is `nu`.
120
  See also [[sf.cmath.ellint.3]].
121
 
122
  #### Regular modified cylindrical Bessel functions <a id="sf.cmath.cyl.bessel.i">[[sf.cmath.cyl.bessel.i]]</a>
123
 
124
  ``` cpp
125
- double cyl_bessel_i(double nu, double x);
126
  float cyl_bessel_if(float nu, float x);
127
  long double cyl_bessel_il(long double nu, long double x);
128
  ```
129
 
130
  *Effects:* These functions compute the regular modified cylindrical
@@ -141,11 +143,11 @@ Bessel functions of their respective arguments `nu` and `x`.
141
  See also [[sf.cmath.cyl.bessel.j]].
142
 
143
  #### Cylindrical Bessel functions of the first kind <a id="sf.cmath.cyl.bessel.j">[[sf.cmath.cyl.bessel.j]]</a>
144
 
145
  ``` cpp
146
- double cyl_bessel_j(double nu, double x);
147
  float cyl_bessel_jf(float nu, float x);
148
  long double cyl_bessel_jl(long double nu, long double x);
149
  ```
150
 
151
  *Effects:* These functions compute the cylindrical Bessel functions of
@@ -159,11 +161,11 @@ the first kind of their respective arguments `nu` and `x`.
159
  *implementation-defined* if `nu >= 128`.
160
 
161
  #### Irregular modified cylindrical Bessel functions <a id="sf.cmath.cyl.bessel.k">[[sf.cmath.cyl.bessel.k]]</a>
162
 
163
  ``` cpp
164
- double cyl_bessel_k(double nu, double x);
165
  float cyl_bessel_kf(float nu, float x);
166
  long double cyl_bessel_kl(long double nu, long double x);
167
  ```
168
 
169
  *Effects:* These functions compute the irregular modified cylindrical
@@ -199,11 +201,11 @@ See also [[sf.cmath.cyl.bessel.i]], [[sf.cmath.cyl.bessel.j]],
199
  [[sf.cmath.cyl.neumann]].
200
 
201
  #### Cylindrical Neumann functions <a id="sf.cmath.cyl.neumann">[[sf.cmath.cyl.neumann]]</a>
202
 
203
  ``` cpp
204
- double cyl_neumann(double nu, double x);
205
  float cyl_neumannf(float nu, float x);
206
  long double cyl_neumannl(long double nu, long double x);
207
  ```
208
 
209
  *Effects:* These functions compute the cylindrical Neumann functions,
@@ -233,11 +235,11 @@ their respective arguments `nu` and `x`.
233
  See also [[sf.cmath.cyl.bessel.j]].
234
 
235
  #### Incomplete elliptic integral of the first kind <a id="sf.cmath.ellint.1">[[sf.cmath.ellint.1]]</a>
236
 
237
  ``` cpp
238
- double ellint_1(double k, double phi);
239
  float ellint_1f(float k, float phi);
240
  long double ellint_1l(long double k, long double phi);
241
  ```
242
 
243
  *Effects:* These functions compute the incomplete elliptic integral of
@@ -249,11 +251,11 @@ measured in radians).
249
  \text{ ,\quad for $|k| \le 1$,}$$ where k is `k` and φ is `phi`.
250
 
251
  #### Incomplete elliptic integral of the second kind <a id="sf.cmath.ellint.2">[[sf.cmath.ellint.2]]</a>
252
 
253
  ``` cpp
254
- double ellint_2(double k, double phi);
255
  float ellint_2f(float k, float phi);
256
  long double ellint_2l(long double k, long double phi);
257
  ```
258
 
259
  *Effects:* These functions compute the incomplete elliptic integral of
@@ -265,11 +267,12 @@ $$\mathsf{E}(k, \phi) = \int_0^\phi \! \sqrt{1 - k^2 \sin^2 \theta} \, \mathsf{d
265
  \text{ ,\quad for $|k| \le 1$,}$$ where k is `k` and φ is `phi`.
266
 
267
  #### Incomplete elliptic integral of the third kind <a id="sf.cmath.ellint.3">[[sf.cmath.ellint.3]]</a>
268
 
269
  ``` cpp
270
- double ellint_3(double k, double nu, double phi);
 
271
  float ellint_3f(float k, float nu, float phi);
272
  long double ellint_3l(long double k, long double nu, long double phi);
273
  ```
274
 
275
  *Effects:* These functions compute the incomplete elliptic integral of
@@ -281,11 +284,11 @@ measured in radians).
281
  where $\nu$ is `nu`, k is `k`, and φ is `phi`.
282
 
283
  #### Exponential integral <a id="sf.cmath.expint">[[sf.cmath.expint]]</a>
284
 
285
  ``` cpp
286
- double expint(double x);
287
  float expintf(float x);
288
  long double expintl(long double x);
289
  ```
290
 
291
  *Effects:* These functions compute the exponential integral of their
@@ -298,11 +301,11 @@ respective arguments `x`.
298
  \;$$ where x is `x`.
299
 
300
  #### Hermite polynomials <a id="sf.cmath.hermite">[[sf.cmath.hermite]]</a>
301
 
302
  ``` cpp
303
- double hermite(unsigned n, double x);
304
  float hermitef(unsigned n, float x);
305
  long double hermitel(unsigned n, long double x);
306
  ```
307
 
308
  *Effects:* These functions compute the Hermite polynomials of their
@@ -318,11 +321,11 @@ respective arguments `n` and `x`.
318
  *implementation-defined* if `n >= 128`.
319
 
320
  #### Laguerre polynomials <a id="sf.cmath.laguerre">[[sf.cmath.laguerre]]</a>
321
 
322
  ``` cpp
323
- double laguerre(unsigned n, double x);
324
  float laguerref(unsigned n, float x);
325
  long double laguerrel(unsigned n, long double x);
326
  ```
327
 
328
  *Effects:* These functions compute the Laguerre polynomials of their
@@ -336,11 +339,11 @@ respective arguments `n` and `x`.
336
  *implementation-defined* if `n >= 128`.
337
 
338
  #### Legendre polynomials <a id="sf.cmath.legendre">[[sf.cmath.legendre]]</a>
339
 
340
  ``` cpp
341
- double legendre(unsigned l, double x);
342
  float legendref(unsigned l, float x);
343
  long double legendrel(unsigned l, long double x);
344
  ```
345
 
346
  *Effects:* These functions compute the Legendre polynomials of their
@@ -355,11 +358,11 @@ respective arguments `l` and `x`.
355
  *implementation-defined* if `l >= 128`.
356
 
357
  #### Riemann zeta function <a id="sf.cmath.riemann.zeta">[[sf.cmath.riemann.zeta]]</a>
358
 
359
  ``` cpp
360
- double riemann_zeta(double x);
361
  float riemann_zetaf(float x);
362
  long double riemann_zetal(long double x);
363
  ```
364
 
365
  *Effects:* These functions compute the Riemann zeta function of their
@@ -389,11 +392,11 @@ respective arguments `x`.
389
  \;$$ where x is `x`.
390
 
391
  #### Spherical Bessel functions of the first kind <a id="sf.cmath.sph.bessel">[[sf.cmath.sph.bessel]]</a>
392
 
393
  ``` cpp
394
- double sph_bessel(unsigned n, double x);
395
  float sph_besself(unsigned n, float x);
396
  long double sph_bessell(unsigned n, long double x);
397
  ```
398
 
399
  *Effects:* These functions compute the spherical Bessel functions of the
@@ -409,11 +412,11 @@ where n is `n` and x is `x`.
409
  See also [[sf.cmath.cyl.bessel.j]].
410
 
411
  #### Spherical associated Legendre functions <a id="sf.cmath.sph.legendre">[[sf.cmath.sph.legendre]]</a>
412
 
413
  ``` cpp
414
- double sph_legendre(unsigned l, unsigned m, double theta);
415
  float sph_legendref(unsigned l, unsigned m, float theta);
416
  long double sph_legendrel(unsigned l, unsigned m, long double theta);
417
  ```
418
 
419
  *Effects:* These functions compute the spherical associated Legendre
@@ -433,11 +436,11 @@ is `theta`.
433
  See also [[sf.cmath.assoc.legendre]].
434
 
435
  #### Spherical Neumann functions <a id="sf.cmath.sph.neumann">[[sf.cmath.sph.neumann]]</a>
436
 
437
  ``` cpp
438
- double sph_neumann(unsigned n, double x);
439
  float sph_neumannf(unsigned n, float x);
440
  long double sph_neumannl(unsigned n, long double x);
441
  ```
442
 
443
  *Effects:* These functions compute the spherical Neumann functions, also
 
1
  ### Mathematical special functions <a id="sf.cmath">[[sf.cmath]]</a>
2
 
3
+ #### General <a id="sf.cmath.general">[[sf.cmath.general]]</a>
 
 
 
4
 
5
+ If any argument value to any of the functions specified in [[sf.cmath]]
6
+ is a NaN (Not a Number), the function shall return a NaN but it shall
7
+ not report a domain error. Otherwise, the function shall report a domain
8
+ error for just those argument values for which:
9
+
10
+ - the function description’s *Returns:* element explicitly specifies a
11
  domain and those argument values fall outside the specified domain, or
12
  - the corresponding mathematical function value has a nonzero imaginary
13
  component, or
14
  - the corresponding mathematical function is not mathematically
15
+ defined.[^14]
16
 
17
  Unless otherwise specified, each function is defined for all finite
18
  values, for negative infinity, and for positive infinity.
19
 
20
  #### Associated Laguerre polynomials <a id="sf.cmath.assoc.laguerre">[[sf.cmath.assoc.laguerre]]</a>
21
 
22
  ``` cpp
23
+ floating-point-type assoc_laguerre(unsigned n, unsigned m, floating-point-type x);
24
  float assoc_laguerref(unsigned n, unsigned m, float x);
25
  long double assoc_laguerrel(unsigned n, unsigned m, long double x);
26
  ```
27
 
28
  *Effects:* These functions compute the associated Laguerre polynomials
 
37
  *implementation-defined* if `n >= 128` or if `m >= 128`.
38
 
39
  #### Associated Legendre functions <a id="sf.cmath.assoc.legendre">[[sf.cmath.assoc.legendre]]</a>
40
 
41
  ``` cpp
42
+ floating-point-type assoc_legendre(unsigned l, unsigned m, floating-point-type x);
43
  float assoc_legendref(unsigned l, unsigned m, float x);
44
  long double assoc_legendrel(unsigned l, unsigned m, long double x);
45
  ```
46
 
47
  *Effects:* These functions compute the associated Legendre functions of
 
56
  *implementation-defined* if `l >= 128`.
57
 
58
  #### Beta function <a id="sf.cmath.beta">[[sf.cmath.beta]]</a>
59
 
60
  ``` cpp
61
+ floating-point-type beta(floating-point-type x, floating-point-type y);
62
  float betaf(float x, float y);
63
  long double betal(long double x, long double y);
64
  ```
65
 
66
  *Effects:* These functions compute the beta function of their respective
 
71
  \text{ ,\quad for $x > 0$,\, $y > 0$,}$$ where x is `x` and y is `y`.
72
 
73
  #### Complete elliptic integral of the first kind <a id="sf.cmath.comp.ellint.1">[[sf.cmath.comp.ellint.1]]</a>
74
 
75
  ``` cpp
76
+ floating-point-type comp_ellint_1(floating-point-type k);
77
  float comp_ellint_1f(float k);
78
  long double comp_ellint_1l(long double k);
79
  ```
80
 
81
  *Effects:* These functions compute the complete elliptic integral of the
 
88
  See also [[sf.cmath.ellint.1]].
89
 
90
  #### Complete elliptic integral of the second kind <a id="sf.cmath.comp.ellint.2">[[sf.cmath.comp.ellint.2]]</a>
91
 
92
  ``` cpp
93
+ floating-point-type comp_ellint_2(floating-point-type k);
94
  float comp_ellint_2f(float k);
95
  long double comp_ellint_2l(long double k);
96
  ```
97
 
98
  *Effects:* These functions compute the complete elliptic integral of the
 
105
  See also [[sf.cmath.ellint.2]].
106
 
107
  #### Complete elliptic integral of the third kind <a id="sf.cmath.comp.ellint.3">[[sf.cmath.comp.ellint.3]]</a>
108
 
109
  ``` cpp
110
+ floating-point-type comp_ellint_3(floating-point-type k, floating-point-type nu);
111
  float comp_ellint_3f(float k, float nu);
112
  long double comp_ellint_3l(long double k, long double nu);
113
  ```
114
 
115
  *Effects:* These functions compute the complete elliptic integral of the
 
122
  See also [[sf.cmath.ellint.3]].
123
 
124
  #### Regular modified cylindrical Bessel functions <a id="sf.cmath.cyl.bessel.i">[[sf.cmath.cyl.bessel.i]]</a>
125
 
126
  ``` cpp
127
+ floating-point-type cyl_bessel_i(floating-point-type nu, floating-point-type x);
128
  float cyl_bessel_if(float nu, float x);
129
  long double cyl_bessel_il(long double nu, long double x);
130
  ```
131
 
132
  *Effects:* These functions compute the regular modified cylindrical
 
143
  See also [[sf.cmath.cyl.bessel.j]].
144
 
145
  #### Cylindrical Bessel functions of the first kind <a id="sf.cmath.cyl.bessel.j">[[sf.cmath.cyl.bessel.j]]</a>
146
 
147
  ``` cpp
148
+ floating-point-type cyl_bessel_j(floating-point-type nu, floating-point-type x);
149
  float cyl_bessel_jf(float nu, float x);
150
  long double cyl_bessel_jl(long double nu, long double x);
151
  ```
152
 
153
  *Effects:* These functions compute the cylindrical Bessel functions of
 
161
  *implementation-defined* if `nu >= 128`.
162
 
163
  #### Irregular modified cylindrical Bessel functions <a id="sf.cmath.cyl.bessel.k">[[sf.cmath.cyl.bessel.k]]</a>
164
 
165
  ``` cpp
166
+ floating-point-type cyl_bessel_k(floating-point-type nu, floating-point-type x);
167
  float cyl_bessel_kf(float nu, float x);
168
  long double cyl_bessel_kl(long double nu, long double x);
169
  ```
170
 
171
  *Effects:* These functions compute the irregular modified cylindrical
 
201
  [[sf.cmath.cyl.neumann]].
202
 
203
  #### Cylindrical Neumann functions <a id="sf.cmath.cyl.neumann">[[sf.cmath.cyl.neumann]]</a>
204
 
205
  ``` cpp
206
+ floating-point-type cyl_neumann(floating-point-type nu, floating-point-type x);
207
  float cyl_neumannf(float nu, float x);
208
  long double cyl_neumannl(long double nu, long double x);
209
  ```
210
 
211
  *Effects:* These functions compute the cylindrical Neumann functions,
 
235
  See also [[sf.cmath.cyl.bessel.j]].
236
 
237
  #### Incomplete elliptic integral of the first kind <a id="sf.cmath.ellint.1">[[sf.cmath.ellint.1]]</a>
238
 
239
  ``` cpp
240
+ floating-point-type ellint_1(floating-point-type k, floating-point-type phi);
241
  float ellint_1f(float k, float phi);
242
  long double ellint_1l(long double k, long double phi);
243
  ```
244
 
245
  *Effects:* These functions compute the incomplete elliptic integral of
 
251
  \text{ ,\quad for $|k| \le 1$,}$$ where k is `k` and φ is `phi`.
252
 
253
  #### Incomplete elliptic integral of the second kind <a id="sf.cmath.ellint.2">[[sf.cmath.ellint.2]]</a>
254
 
255
  ``` cpp
256
+ floating-point-type ellint_2(floating-point-type k, floating-point-type phi);
257
  float ellint_2f(float k, float phi);
258
  long double ellint_2l(long double k, long double phi);
259
  ```
260
 
261
  *Effects:* These functions compute the incomplete elliptic integral of
 
267
  \text{ ,\quad for $|k| \le 1$,}$$ where k is `k` and φ is `phi`.
268
 
269
  #### Incomplete elliptic integral of the third kind <a id="sf.cmath.ellint.3">[[sf.cmath.ellint.3]]</a>
270
 
271
  ``` cpp
272
+ floating-point-type ellint_3(floating-point-type k, floating-point-type nu,
273
+ floating-point-type phi);
274
  float ellint_3f(float k, float nu, float phi);
275
  long double ellint_3l(long double k, long double nu, long double phi);
276
  ```
277
 
278
  *Effects:* These functions compute the incomplete elliptic integral of
 
284
  where $\nu$ is `nu`, k is `k`, and φ is `phi`.
285
 
286
  #### Exponential integral <a id="sf.cmath.expint">[[sf.cmath.expint]]</a>
287
 
288
  ``` cpp
289
+ floating-point-type expint(floating-point-type x);
290
  float expintf(float x);
291
  long double expintl(long double x);
292
  ```
293
 
294
  *Effects:* These functions compute the exponential integral of their
 
301
  \;$$ where x is `x`.
302
 
303
  #### Hermite polynomials <a id="sf.cmath.hermite">[[sf.cmath.hermite]]</a>
304
 
305
  ``` cpp
306
+ floating-point-type hermite(unsigned n, floating-point-type x);
307
  float hermitef(unsigned n, float x);
308
  long double hermitel(unsigned n, long double x);
309
  ```
310
 
311
  *Effects:* These functions compute the Hermite polynomials of their
 
321
  *implementation-defined* if `n >= 128`.
322
 
323
  #### Laguerre polynomials <a id="sf.cmath.laguerre">[[sf.cmath.laguerre]]</a>
324
 
325
  ``` cpp
326
+ floating-point-type laguerre(unsigned n, floating-point-type x);
327
  float laguerref(unsigned n, float x);
328
  long double laguerrel(unsigned n, long double x);
329
  ```
330
 
331
  *Effects:* These functions compute the Laguerre polynomials of their
 
339
  *implementation-defined* if `n >= 128`.
340
 
341
  #### Legendre polynomials <a id="sf.cmath.legendre">[[sf.cmath.legendre]]</a>
342
 
343
  ``` cpp
344
+ floating-point-type legendre(unsigned l, floating-point-type x);
345
  float legendref(unsigned l, float x);
346
  long double legendrel(unsigned l, long double x);
347
  ```
348
 
349
  *Effects:* These functions compute the Legendre polynomials of their
 
358
  *implementation-defined* if `l >= 128`.
359
 
360
  #### Riemann zeta function <a id="sf.cmath.riemann.zeta">[[sf.cmath.riemann.zeta]]</a>
361
 
362
  ``` cpp
363
+ floating-point-type riemann_zeta(floating-point-type x);
364
  float riemann_zetaf(float x);
365
  long double riemann_zetal(long double x);
366
  ```
367
 
368
  *Effects:* These functions compute the Riemann zeta function of their
 
392
  \;$$ where x is `x`.
393
 
394
  #### Spherical Bessel functions of the first kind <a id="sf.cmath.sph.bessel">[[sf.cmath.sph.bessel]]</a>
395
 
396
  ``` cpp
397
+ floating-point-type sph_bessel(unsigned n, floating-point-type x);
398
  float sph_besself(unsigned n, float x);
399
  long double sph_bessell(unsigned n, long double x);
400
  ```
401
 
402
  *Effects:* These functions compute the spherical Bessel functions of the
 
412
  See also [[sf.cmath.cyl.bessel.j]].
413
 
414
  #### Spherical associated Legendre functions <a id="sf.cmath.sph.legendre">[[sf.cmath.sph.legendre]]</a>
415
 
416
  ``` cpp
417
+ floating-point-type sph_legendre(unsigned l, unsigned m, floating-point-type theta);
418
  float sph_legendref(unsigned l, unsigned m, float theta);
419
  long double sph_legendrel(unsigned l, unsigned m, long double theta);
420
  ```
421
 
422
  *Effects:* These functions compute the spherical associated Legendre
 
436
  See also [[sf.cmath.assoc.legendre]].
437
 
438
  #### Spherical Neumann functions <a id="sf.cmath.sph.neumann">[[sf.cmath.sph.neumann]]</a>
439
 
440
  ``` cpp
441
+ floating-point-type sph_neumann(unsigned n, floating-point-type x);
442
  float sph_neumannf(unsigned n, float x);
443
  long double sph_neumannl(unsigned n, long double x);
444
  ```
445
 
446
  *Effects:* These functions compute the spherical Neumann functions, also