From Jason Turner

[sf.cmath]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpt_d78z_o/{from.md → to.md} +752 -0
tmp/tmpt_d78z_o/{from.md → to.md} RENAMED
@@ -0,0 +1,752 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.[^18]
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
27
+ of their respective arguments `n`, `m`, and `x`.
28
+
29
+ *Returns:* $$%
30
+ \mathsf{L}_n^m(x) =
31
+ (-1)^m \frac{\mathsf{d} ^ m}
32
+ {\mathsf{d}x ^ m} \, \mathsf{L}_{n+m}(x),
33
+ \quad \mbox{for $x \ge 0$}$$ where n is `n`, m is `m`, and x is
34
+ `x`.
35
+
36
+ *Remarks:* The effect of calling each of these functions is
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
+ double assoc_legendre(unsigned l, unsigned m, double 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
48
+ their respective arguments `l`, `m`, and `x`.
49
+
50
+ *Returns:* $$%
51
+ \mathsf{P}_\ell^m(x) =
52
+ (1 - x^2) ^ {m/2}
53
+ \:
54
+ \frac{ \mathsf{d} ^ m}
55
+ { \mathsf{d}x ^ m} \, \mathsf{P}_\ell(x),
56
+ \quad \mbox{for $|x| \le 1$}$$ where l is `l`, m is `m`, and x is
57
+ `x`.
58
+
59
+ *Remarks:* The effect of calling each of these functions is
60
+ *implementation-defined* if `l >= 128`.
61
+
62
+ #### Beta function <a id="sf.cmath.beta">[[sf.cmath.beta]]</a>
63
+
64
+ ``` cpp
65
+ double beta(double x, double y);
66
+ float betaf(float x, float y);
67
+ long double betal(long double x, long double y);
68
+ ```
69
+
70
+ *Effects:* These functions compute the beta function of their respective
71
+ arguments `x` and `y`.
72
+
73
+ *Returns:* $$%
74
+ \mathsf{B}(x, y) =
75
+ \frac{ \Gamma(x) \, \Gamma(y) }
76
+ { \Gamma(x+y) },
77
+ \quad \mbox{for $x > 0$,\, $y > 0$}$$ where x is `x` and y is
78
+ `y`.
79
+
80
+ #### Complete elliptic integral of the first kind <a id="sf.cmath.comp_ellint_1">[[sf.cmath.comp_ellint_1]]</a>
81
+
82
+ ``` cpp
83
+ double comp_ellint_1(double k);
84
+ float comp_ellint_1f(float k);
85
+ long double comp_ellint_1l(long double k);
86
+ ```
87
+
88
+ *Effects:* These functions compute the complete elliptic integral of the
89
+ first kind of their respective arguments `k`.
90
+
91
+ *Returns:* $$%
92
+ \mathsf{K}(k) =
93
+ \mathsf{F}(k, \pi / 2),
94
+ \quad \mbox{for $|k| \le 1$}$$ where k is `k`.
95
+
96
+ See also [[sf.cmath.ellint_1]].
97
+
98
+ #### Complete elliptic integral of the second kind <a id="sf.cmath.comp_ellint_2">[[sf.cmath.comp_ellint_2]]</a>
99
+
100
+ ``` cpp
101
+ double comp_ellint_2(double k);
102
+ float comp_ellint_2f(float k);
103
+ long double comp_ellint_2l(long double k);
104
+ ```
105
+
106
+ *Effects:* These functions compute the complete elliptic integral of the
107
+ second kind of their respective arguments `k`.
108
+
109
+ *Returns:* $$%
110
+ \mathsf{E}(k) =
111
+ \mathsf{E}(k, \pi / 2),
112
+ \quad \mbox{for $|k| \le 1$}$$ where k is `k`.
113
+
114
+ See also [[sf.cmath.ellint_2]].
115
+
116
+ #### Complete elliptic integral of the third kind <a id="sf.cmath.comp_ellint_3">[[sf.cmath.comp_ellint_3]]</a>
117
+
118
+ ``` cpp
119
+ double comp_ellint_3(double k, double nu);
120
+ float comp_ellint_3f(float k, float nu);
121
+ long double comp_ellint_3l(long double k, long double nu);
122
+ ```
123
+
124
+ *Effects:* These functions compute the complete elliptic integral of the
125
+ third kind of their respective arguments `k` and `nu`.
126
+
127
+ *Returns:* $$%
128
+ \mathsf{\Pi}(\nu, k) = \mathsf{\Pi}(\nu, k, \pi / 2),
129
+ \quad \mbox{for $|k| \le 1$}$$ where k is `k` and $\nu$ is `nu`.
130
+
131
+ See also [[sf.cmath.ellint_3]].
132
+
133
+ #### Regular modified cylindrical Bessel functions <a id="sf.cmath.cyl_bessel_i">[[sf.cmath.cyl_bessel_i]]</a>
134
+
135
+ ``` cpp
136
+ double cyl_bessel_i(double nu, double x);
137
+ float cyl_bessel_if(float nu, float x);
138
+ long double cyl_bessel_il(long double nu, long double x);
139
+ ```
140
+
141
+ *Effects:* These functions compute the regular modified cylindrical
142
+ Bessel functions of their respective arguments `nu` and `x`.
143
+
144
+ *Returns:* $$%
145
+ \mathsf{I}_\nu(x) =
146
+ i^{-\nu} \mathsf{J}_\nu(ix)
147
+ =
148
+ \sum_{k=0}^\infty \frac{(x/2)^{\nu+2k}}
149
+ {k! \: \Gamma(\nu+k+1)},
150
+ \quad \mbox{for $x \ge 0$}$$ where $\nu$ is `nu` and x is `x`.
151
+
152
+ *Remarks:* The effect of calling each of these functions is
153
+ *implementation-defined* if `nu >= 128`.
154
+
155
+ See also [[sf.cmath.cyl_bessel_j]].
156
+
157
+ #### Cylindrical Bessel functions of the first kind <a id="sf.cmath.cyl_bessel_j">[[sf.cmath.cyl_bessel_j]]</a>
158
+
159
+ ``` cpp
160
+ double cyl_bessel_j(double nu, double x);
161
+ float cyl_bessel_jf(float nu, float x);
162
+ long double cyl_bessel_jl(long double nu, long double x);
163
+ ```
164
+
165
+ *Effects:* These functions compute the cylindrical Bessel functions of
166
+ the first kind of their respective arguments `nu` and `x`.
167
+
168
+ *Returns:* $$%
169
+ \mathsf{J}_\nu(x) =
170
+ \sum_{k=0}^\infty \frac{(-1)^k (x/2)^{\nu+2k}}
171
+ {k! \: \Gamma(\nu+k+1)},
172
+ \quad \mbox{for $x \ge 0$}$$ where $\nu$ is `nu` and x is `x`.
173
+
174
+ *Remarks:* The effect of calling each of these functions is
175
+ *implementation-defined* if `nu >= 128`.
176
+
177
+ #### Irregular modified cylindrical Bessel functions <a id="sf.cmath.cyl_bessel_k">[[sf.cmath.cyl_bessel_k]]</a>
178
+
179
+ ``` cpp
180
+ double cyl_bessel_k(double nu, double x);
181
+ float cyl_bessel_kf(float nu, float x);
182
+ long double cyl_bessel_kl(long double nu, long double x);
183
+ ```
184
+
185
+ *Effects:* These functions compute the irregular modified cylindrical
186
+ Bessel functions of their respective arguments `nu` and `x`.
187
+
188
+ *Returns:* $$%
189
+ \mathsf{K}_\nu(x) =
190
+ (\pi/2)i^{\nu+1} ( \mathsf{J}_\nu(ix)
191
+ + i \mathsf{N}_\nu(ix)
192
+ )
193
+ =
194
+ \left\{
195
+ \begin{array}{cl}
196
+ \displaystyle
197
+ \frac{\pi}{2}
198
+ \frac{\mathsf{I}_{-\nu}(x) - \mathsf{I}_{\nu}(x)}
199
+ {\sin \nu\pi },
200
+ & \mbox{for $x \ge 0$ and non-integral $\nu$}
201
+ \\
202
+ \\
203
+ \displaystyle
204
+ \frac{\pi}{2}
205
+ \lim_{\mu \rightarrow \nu} \frac{\mathsf{I}_{-\mu}(x) - \mathsf{I}_{\mu}(x)}
206
+ {\sin \mu\pi },
207
+ & \mbox{for $x \ge 0$ and integral $\nu$}
208
+ \end{array}
209
+ \right.$$ where $\nu$ is `nu` and x is `x`.
210
+
211
+ *Remarks:* The effect of calling each of these functions is
212
+ *implementation-defined* if `nu >= 128`.
213
+
214
+ See also [[sf.cmath.cyl_bessel_i]], [[sf.cmath.cyl_bessel_j]],
215
+ [[sf.cmath.cyl_neumann]].
216
+
217
+ #### Cylindrical Neumann functions <a id="sf.cmath.cyl_neumann">[[sf.cmath.cyl_neumann]]</a>
218
+
219
+ ``` cpp
220
+ double cyl_neumann(double nu, double x);
221
+ float cyl_neumannf(float nu, float x);
222
+ long double cyl_neumannl(long double nu, long double x);
223
+ ```
224
+
225
+ *Effects:* These functions compute the cylindrical Neumann functions,
226
+ also known as the cylindrical Bessel functions of the second kind, of
227
+ their respective arguments `nu` and `x`.
228
+
229
+ *Returns:* $$%
230
+ \mathsf{N}_\nu(x) =
231
+ \left\{
232
+ \begin{array}{cl}
233
+ \displaystyle
234
+ \frac{\mathsf{J}_\nu(x) \cos \nu\pi - \mathsf{J}_{-\nu}(x)}
235
+ {\sin \nu\pi },
236
+ & \mbox{for $x \ge 0$ and non-integral $\nu$}
237
+ \\
238
+ \\
239
+ \displaystyle
240
+ \lim_{\mu \rightarrow \nu} \frac{\mathsf{J}_\mu(x) \cos \mu\pi - \mathsf{J}_{-\mu}(x)}
241
+ {\sin \mu\pi },
242
+ & \mbox{for $x \ge 0$ and integral $\nu$}
243
+ \end{array}
244
+ \right.$$ where $\nu$ is `nu` and x is `x`.
245
+
246
+ *Remarks:* The effect of calling each of these functions is
247
+ *implementation-defined* if `nu >= 128`.
248
+
249
+ See also [[sf.cmath.cyl_bessel_j]].
250
+
251
+ #### Incomplete elliptic integral of the first kind <a id="sf.cmath.ellint_1">[[sf.cmath.ellint_1]]</a>
252
+
253
+ ``` cpp
254
+ double ellint_1(double k, double phi);
255
+ float ellint_1f(float k, float phi);
256
+ long double ellint_1l(long double k, long double phi);
257
+ ```
258
+
259
+ *Effects:* These functions compute the incomplete elliptic integral of
260
+ the first kind of their respective arguments `k` and `phi` (`phi`
261
+ measured in radians).
262
+
263
+ *Returns:* $$%
264
+ \mathsf{F}(k, \phi) =
265
+ \int_0^\phi \! \frac{\mathsf{d}\theta}
266
+ {\sqrt{1 - k^2 \sin^2 \theta}},
267
+ \quad \mbox{for $|k| \le 1$}$$ where k is `k` and φ is `phi`.
268
+
269
+ #### Incomplete elliptic integral of the second kind <a id="sf.cmath.ellint_2">[[sf.cmath.ellint_2]]</a>
270
+
271
+ ``` cpp
272
+ double ellint_2(double k, double phi);
273
+ float ellint_2f(float k, float phi);
274
+ long double ellint_2l(long double k, long double phi);
275
+ ```
276
+
277
+ *Effects:* These functions compute the incomplete elliptic integral of
278
+ the second kind of their respective arguments `k` and `phi` (`phi`
279
+ measured in radians).
280
+
281
+ *Returns:* $$%
282
+ \mathsf{E}(k, \phi) =
283
+ \int_0^\phi \! \sqrt{1 - k^2 \sin^2 \theta} \, \mathsf{d}\theta,
284
+ \quad \mbox{for $|k| \le 1$}$$ where k is `k` and φ is `phi`.
285
+
286
+ #### Incomplete elliptic integral of the third kind <a id="sf.cmath.ellint_3">[[sf.cmath.ellint_3]]</a>
287
+
288
+ ``` cpp
289
+ double ellint_3(double k, double nu, double phi);
290
+ float ellint_3f(float k, float nu, float phi);
291
+ long double ellint_3l(long double k, long double nu, long double phi);
292
+ ```
293
+
294
+ *Effects:* These functions compute the incomplete elliptic integral of
295
+ the third kind of their respective arguments `k`, `nu`, and `phi` (`phi`
296
+ measured in radians).
297
+
298
+ *Returns:* $$%
299
+ \mathsf{\Pi}(\nu, k, \phi) =
300
+ \int_0^\phi \! \frac{ \mathsf{d}\theta }
301
+ { (1 - \nu \, \sin^2 \theta) \sqrt{1 - k^2 \sin^2 \theta} },
302
+ \quad \mbox{for $|k| \le 1$}$$ where $\nu$ is `nu`, k is `k`, and
303
+ φ is `phi`.
304
+
305
+ #### Exponential integral <a id="sf.cmath.expint">[[sf.cmath.expint]]</a>
306
+
307
+ ``` cpp
308
+ double expint(double x);
309
+ float expintf(float x);
310
+ long double expintl(long double x);
311
+ ```
312
+
313
+ *Effects:* These functions compute the exponential integral of their
314
+ respective arguments `x`.
315
+
316
+ *Returns:* $$%
317
+ \mathsf{Ei}(x) =
318
+ - \int_{-x}^\infty \frac{e^{-t}}
319
+ {t } \, \mathsf{d}t
320
+ \;$$ where x is `x`.
321
+
322
+ #### Hermite polynomials <a id="sf.cmath.hermite">[[sf.cmath.hermite]]</a>
323
+
324
+ ``` cpp
325
+ double hermite(unsigned n, double x);
326
+ float hermitef(unsigned n, float x);
327
+ long double hermitel(unsigned n, long double x);
328
+ ```
329
+
330
+ *Effects:* These functions compute the Hermite polynomials of their
331
+ respective arguments `n` and `x`.
332
+
333
+ *Returns:* $$%
334
+ \mathsf{H}_n(x) =
335
+ (-1)^n e^{x^2} \frac{ \mathsf{d} ^n}
336
+ { \mathsf{d}x^n} \, e^{-x^2}
337
+ \;$$ where n is `n` and x is `x`.
338
+
339
+ *Remarks:* The effect of calling each of these functions is
340
+ *implementation-defined* if `n >= 128`.
341
+
342
+ #### Laguerre polynomials <a id="sf.cmath.laguerre">[[sf.cmath.laguerre]]</a>
343
+
344
+ ``` cpp
345
+ double laguerre(unsigned n, double x);
346
+ float laguerref(unsigned n, float x);
347
+ long double laguerrel(unsigned n, long double x);
348
+ ```
349
+
350
+ *Effects:* These functions compute the Laguerre polynomials of their
351
+ respective arguments `n` and `x`.
352
+
353
+ *Returns:* $$%
354
+ \mathsf{L}_n(x) =
355
+ \frac{e^x}{n!} \frac{ \mathsf{d} ^ n}
356
+ { \mathsf{d}x ^ n} \, (x^n e^{-x}),
357
+ \quad \mbox{for $x \ge 0$}$$ where n is `n` and x is `x`.
358
+
359
+ *Remarks:* The effect of calling each of these functions is
360
+ *implementation-defined* if `n >= 128`.
361
+
362
+ #### Legendre polynomials <a id="sf.cmath.legendre">[[sf.cmath.legendre]]</a>
363
+
364
+ ``` cpp
365
+ double legendre(unsigned l, double x);
366
+ float legendref(unsigned l, float x);
367
+ long double legendrel(unsigned l, long double x);
368
+ ```
369
+
370
+ *Effects:* These functions compute the Legendre polynomials of their
371
+ respective arguments `l` and `x`.
372
+
373
+ *Returns:* $$%
374
+ \mathsf{P}_\ell(x) =
375
+ \frac{1}
376
+ {2^\ell \, \ell!}
377
+ \frac{ \mathsf{d} ^ \ell}
378
+ { \mathsf{d}x ^ \ell} \, (x^2 - 1) ^ \ell,
379
+ \quad \mbox{for $|x| \le 1$}$$ where l is `l` and x is `x`.
380
+
381
+ *Remarks:* The effect of calling each of these functions is
382
+ *implementation-defined* if `l >= 128`.
383
+
384
+ #### Riemann zeta function <a id="sf.cmath.riemann_zeta">[[sf.cmath.riemann_zeta]]</a>
385
+
386
+ ``` cpp
387
+ double riemann_zeta(double x);
388
+ float riemann_zetaf(float x);
389
+ long double riemann_zetal(long double x);
390
+ ```
391
+
392
+ *Effects:* These functions compute the Riemann zeta function of their
393
+ respective arguments `x`.
394
+
395
+ *Returns:* $$%
396
+ \mathsf{\zeta}(x) =
397
+ \left\{
398
+ \begin{array}{cl}
399
+ \displaystyle
400
+ \sum_{k=1}^\infty k^{-x},
401
+ & \mbox{for $x > 1$}
402
+ \\
403
+ \\
404
+ \displaystyle
405
+ \frac{1}
406
+ {1 - 2^{1-x}}
407
+ \sum_{k=1}^\infty (-1)^{k-1} k^{-x},
408
+ & \mbox{for $0 \le x \le 1$}
409
+ \\
410
+ \\
411
+ \displaystyle
412
+ 2^x \pi^{x-1} \sin(\frac{\pi x}{2}) \, \Gamma(1-x) \, \zeta(1-x),
413
+ & \mbox{for $x < 0$}
414
+ \end{array}
415
+ \right.
416
+ \;$$ where x is `x`.
417
+
418
+ #### Spherical Bessel functions of the first kind <a id="sf.cmath.sph_bessel">[[sf.cmath.sph_bessel]]</a>
419
+
420
+ ``` cpp
421
+ double sph_bessel(unsigned n, double x);
422
+ float sph_besself(unsigned n, float x);
423
+ long double sph_bessell(unsigned n, long double x);
424
+ ```
425
+
426
+ *Effects:* These functions compute the spherical Bessel functions of the
427
+ first kind of their respective arguments `n` and `x`.
428
+
429
+ *Returns:* $$%
430
+ \mathsf{j}_n(x) =
431
+ (\pi/2x)^{1\!/\!2} \mathsf{J}_{n + 1\!/\!2}(x),
432
+ \quad \mbox{for $x \ge 0$}$$ where n is `n` and x is `x`.
433
+
434
+ *Remarks:* The effect of calling each of these functions is
435
+ *implementation-defined* if `n >= 128`.
436
+
437
+ See also [[sf.cmath.cyl_bessel_j]].
438
+
439
+ #### Spherical associated Legendre functions <a id="sf.cmath.sph_legendre">[[sf.cmath.sph_legendre]]</a>
440
+
441
+ ``` cpp
442
+ double sph_legendre(unsigned l, unsigned m, double theta);
443
+ float sph_legendref(unsigned l, unsigned m, float theta);
444
+ long double sph_legendrel(unsigned l, unsigned m, long double theta);
445
+ ```
446
+
447
+ *Effects:* These functions compute the spherical associated Legendre
448
+ functions of their respective arguments `l`, `m`, and `theta` (`theta`
449
+ measured in radians).
450
+
451
+ *Returns:* $$%
452
+ \mathsf{Y}_\ell^m(\theta, 0)
453
+ \;$$ where $$%
454
+ \mathsf{Y}_\ell^m(\theta, \phi) =
455
+ (-1)^m \left[ \frac{(2 \ell + 1)}
456
+ {4 \pi}
457
+ \frac{(\ell - m)!}
458
+ {(\ell + m)!}
459
+ \right]^{1/2}
460
+ \mathsf{P}_\ell^m
461
+ ( \cos\theta ) e ^ {i m \phi},
462
+ \quad \mbox{for $|m| \le \ell$}$$ and l is `l`, m is `m`, and θ
463
+ is `theta`.
464
+
465
+ *Remarks:* The effect of calling each of these functions is
466
+ *implementation-defined* if `l >= 128`.
467
+
468
+ See also [[sf.cmath.assoc_legendre]].
469
+
470
+ #### Spherical Neumann functions <a id="sf.cmath.sph_neumann">[[sf.cmath.sph_neumann]]</a>
471
+
472
+ ``` cpp
473
+ double sph_neumann(unsigned n, double x);
474
+ float sph_neumannf(unsigned n, float x);
475
+ long double sph_neumannl(unsigned n, long double x);
476
+ ```
477
+
478
+ *Effects:* These functions compute the spherical Neumann functions, also
479
+ known as the spherical Bessel functions of the second kind, of their
480
+ respective arguments `n` and `x`.
481
+
482
+ *Returns:* $$%
483
+ \mathsf{n}_n(x) =
484
+ (\pi/2x)^{1\!/\!2} \mathsf{N}_{n + 1\!/\!2}(x),
485
+ \quad \mbox{for $x \ge 0$}$$ where n is `n` and x is `x`.
486
+
487
+ *Remarks:* The effect of calling each of these functions is
488
+ *implementation-defined* if `n >= 128`.
489
+
490
+ See also [[sf.cmath.cyl_neumann]].
491
+
492
+ <!-- Link reference definitions -->
493
+ [accumulate]: #accumulate
494
+ [adjacent.difference]: #adjacent.difference
495
+ [algorithms]: algorithms.md#algorithms
496
+ [bad.alloc]: language.md#bad.alloc
497
+ [basic.fundamental]: basic.md#basic.fundamental
498
+ [basic.stc.thread]: basic.md#basic.stc.thread
499
+ [basic.types]: basic.md#basic.types
500
+ [c.math]: #c.math
501
+ [c.math.abs]: #c.math.abs
502
+ [c.math.fpclass]: #c.math.fpclass
503
+ [c.math.hypot3]: #c.math.hypot3
504
+ [c.math.rand]: #c.math.rand
505
+ [cfenv]: #cfenv
506
+ [cfenv.syn]: #cfenv.syn
507
+ [class.gslice]: #class.gslice
508
+ [class.gslice.overview]: #class.gslice.overview
509
+ [class.slice]: #class.slice
510
+ [class.slice.overview]: #class.slice.overview
511
+ [cmath.syn]: #cmath.syn
512
+ [cmplx.over]: #cmplx.over
513
+ [complex]: #complex
514
+ [complex.literals]: #complex.literals
515
+ [complex.member.ops]: #complex.member.ops
516
+ [complex.members]: #complex.members
517
+ [complex.numbers]: #complex.numbers
518
+ [complex.ops]: #complex.ops
519
+ [complex.special]: #complex.special
520
+ [complex.syn]: #complex.syn
521
+ [complex.transcendentals]: #complex.transcendentals
522
+ [complex.value.ops]: #complex.value.ops
523
+ [cons.slice]: #cons.slice
524
+ [conv.prom]: conv.md#conv.prom
525
+ [cpp.pragma]: cpp.md#cpp.pragma
526
+ [cstdlib.syn]: language.md#cstdlib.syn
527
+ [dcl.array]: dcl.md#dcl.array
528
+ [dcl.init]: dcl.md#dcl.init
529
+ [exclusive.scan]: #exclusive.scan
530
+ [function.objects]: utilities.md#function.objects
531
+ [gslice.access]: #gslice.access
532
+ [gslice.array.assign]: #gslice.array.assign
533
+ [gslice.array.comp.assign]: #gslice.array.comp.assign
534
+ [gslice.array.fill]: #gslice.array.fill
535
+ [gslice.cons]: #gslice.cons
536
+ [implimits]: limits.md#implimits
537
+ [inclusive.scan]: #inclusive.scan
538
+ [indirect.array.assign]: #indirect.array.assign
539
+ [indirect.array.comp.assign]: #indirect.array.comp.assign
540
+ [indirect.array.fill]: #indirect.array.fill
541
+ [inner.product]: #inner.product
542
+ [input.iterators]: iterators.md#input.iterators
543
+ [input.output]: input.md#input.output
544
+ [iostate.flags]: input.md#iostate.flags
545
+ [istream.formatted]: input.md#istream.formatted
546
+ [iterator.requirements.general]: iterators.md#iterator.requirements.general
547
+ [library.c]: library.md#library.c
548
+ [mask.array.assign]: #mask.array.assign
549
+ [mask.array.comp.assign]: #mask.array.comp.assign
550
+ [mask.array.fill]: #mask.array.fill
551
+ [numarray]: #numarray
552
+ [numeric.iota]: #numeric.iota
553
+ [numeric.ops]: #numeric.ops
554
+ [numeric.ops.gcd]: #numeric.ops.gcd
555
+ [numeric.ops.lcm]: #numeric.ops.lcm
556
+ [numeric.ops.overview]: #numeric.ops.overview
557
+ [numeric.requirements]: #numeric.requirements
558
+ [numerics]: #numerics
559
+ [numerics.defns]: #numerics.defns
560
+ [numerics.general]: #numerics.general
561
+ [output.iterators]: iterators.md#output.iterators
562
+ [partial.sum]: #partial.sum
563
+ [rand]: #rand
564
+ [rand.adapt]: #rand.adapt
565
+ [rand.adapt.disc]: #rand.adapt.disc
566
+ [rand.adapt.general]: #rand.adapt.general
567
+ [rand.adapt.ibits]: #rand.adapt.ibits
568
+ [rand.adapt.shuf]: #rand.adapt.shuf
569
+ [rand.device]: #rand.device
570
+ [rand.dist]: #rand.dist
571
+ [rand.dist.bern]: #rand.dist.bern
572
+ [rand.dist.bern.bernoulli]: #rand.dist.bern.bernoulli
573
+ [rand.dist.bern.bin]: #rand.dist.bern.bin
574
+ [rand.dist.bern.geo]: #rand.dist.bern.geo
575
+ [rand.dist.bern.negbin]: #rand.dist.bern.negbin
576
+ [rand.dist.general]: #rand.dist.general
577
+ [rand.dist.norm]: #rand.dist.norm
578
+ [rand.dist.norm.cauchy]: #rand.dist.norm.cauchy
579
+ [rand.dist.norm.chisq]: #rand.dist.norm.chisq
580
+ [rand.dist.norm.f]: #rand.dist.norm.f
581
+ [rand.dist.norm.lognormal]: #rand.dist.norm.lognormal
582
+ [rand.dist.norm.normal]: #rand.dist.norm.normal
583
+ [rand.dist.norm.t]: #rand.dist.norm.t
584
+ [rand.dist.pois]: #rand.dist.pois
585
+ [rand.dist.pois.exp]: #rand.dist.pois.exp
586
+ [rand.dist.pois.extreme]: #rand.dist.pois.extreme
587
+ [rand.dist.pois.gamma]: #rand.dist.pois.gamma
588
+ [rand.dist.pois.poisson]: #rand.dist.pois.poisson
589
+ [rand.dist.pois.weibull]: #rand.dist.pois.weibull
590
+ [rand.dist.samp]: #rand.dist.samp
591
+ [rand.dist.samp.discrete]: #rand.dist.samp.discrete
592
+ [rand.dist.samp.pconst]: #rand.dist.samp.pconst
593
+ [rand.dist.samp.plinear]: #rand.dist.samp.plinear
594
+ [rand.dist.uni]: #rand.dist.uni
595
+ [rand.dist.uni.int]: #rand.dist.uni.int
596
+ [rand.dist.uni.real]: #rand.dist.uni.real
597
+ [rand.eng]: #rand.eng
598
+ [rand.eng.lcong]: #rand.eng.lcong
599
+ [rand.eng.mers]: #rand.eng.mers
600
+ [rand.eng.sub]: #rand.eng.sub
601
+ [rand.predef]: #rand.predef
602
+ [rand.req]: #rand.req
603
+ [rand.req.adapt]: #rand.req.adapt
604
+ [rand.req.dist]: #rand.req.dist
605
+ [rand.req.eng]: #rand.req.eng
606
+ [rand.req.genl]: #rand.req.genl
607
+ [rand.req.seedseq]: #rand.req.seedseq
608
+ [rand.req.urng]: #rand.req.urng
609
+ [rand.synopsis]: #rand.synopsis
610
+ [rand.util]: #rand.util
611
+ [rand.util.canonical]: #rand.util.canonical
612
+ [rand.util.seedseq]: #rand.util.seedseq
613
+ [random.access.iterators]: iterators.md#random.access.iterators
614
+ [reduce]: #reduce
615
+ [res.on.data.races]: library.md#res.on.data.races
616
+ [sf.cmath]: #sf.cmath
617
+ [sf.cmath.assoc_laguerre]: #sf.cmath.assoc_laguerre
618
+ [sf.cmath.assoc_legendre]: #sf.cmath.assoc_legendre
619
+ [sf.cmath.beta]: #sf.cmath.beta
620
+ [sf.cmath.comp_ellint_1]: #sf.cmath.comp_ellint_1
621
+ [sf.cmath.comp_ellint_2]: #sf.cmath.comp_ellint_2
622
+ [sf.cmath.comp_ellint_3]: #sf.cmath.comp_ellint_3
623
+ [sf.cmath.cyl_bessel_i]: #sf.cmath.cyl_bessel_i
624
+ [sf.cmath.cyl_bessel_j]: #sf.cmath.cyl_bessel_j
625
+ [sf.cmath.cyl_bessel_k]: #sf.cmath.cyl_bessel_k
626
+ [sf.cmath.cyl_neumann]: #sf.cmath.cyl_neumann
627
+ [sf.cmath.ellint_1]: #sf.cmath.ellint_1
628
+ [sf.cmath.ellint_2]: #sf.cmath.ellint_2
629
+ [sf.cmath.ellint_3]: #sf.cmath.ellint_3
630
+ [sf.cmath.expint]: #sf.cmath.expint
631
+ [sf.cmath.hermite]: #sf.cmath.hermite
632
+ [sf.cmath.laguerre]: #sf.cmath.laguerre
633
+ [sf.cmath.legendre]: #sf.cmath.legendre
634
+ [sf.cmath.riemann_zeta]: #sf.cmath.riemann_zeta
635
+ [sf.cmath.sph_bessel]: #sf.cmath.sph_bessel
636
+ [sf.cmath.sph_legendre]: #sf.cmath.sph_legendre
637
+ [sf.cmath.sph_neumann]: #sf.cmath.sph_neumann
638
+ [slice.access]: #slice.access
639
+ [slice.arr.assign]: #slice.arr.assign
640
+ [slice.arr.comp.assign]: #slice.arr.comp.assign
641
+ [slice.arr.fill]: #slice.arr.fill
642
+ [strings]: strings.md#strings
643
+ [tab:RandomDistribution]: #tab:RandomDistribution
644
+ [tab:RandomEngine]: #tab:RandomEngine
645
+ [tab:SeedSequence]: #tab:SeedSequence
646
+ [tab:UniformRandomBitGenerator]: #tab:UniformRandomBitGenerator
647
+ [tab:copyassignable]: #tab:copyassignable
648
+ [tab:copyconstructible]: #tab:copyconstructible
649
+ [tab:equalitycomparable]: #tab:equalitycomparable
650
+ [tab:iterator.input.requirements]: iterators.md#tab:iterator.input.requirements
651
+ [tab:moveassignable]: #tab:moveassignable
652
+ [tab:moveconstructible]: #tab:moveconstructible
653
+ [tab:numerics.lib.summary]: #tab:numerics.lib.summary
654
+ [template.gslice.array]: #template.gslice.array
655
+ [template.gslice.array.overview]: #template.gslice.array.overview
656
+ [template.indirect.array]: #template.indirect.array
657
+ [template.indirect.array.overview]: #template.indirect.array.overview
658
+ [template.mask.array]: #template.mask.array
659
+ [template.mask.array.overview]: #template.mask.array.overview
660
+ [template.slice.array]: #template.slice.array
661
+ [template.slice.array.overview]: #template.slice.array.overview
662
+ [template.valarray]: #template.valarray
663
+ [template.valarray.overview]: #template.valarray.overview
664
+ [thread.thread.class]: thread.md#thread.thread.class
665
+ [transform.exclusive.scan]: #transform.exclusive.scan
666
+ [transform.inclusive.scan]: #transform.inclusive.scan
667
+ [transform.reduce]: #transform.reduce
668
+ [valarray.access]: #valarray.access
669
+ [valarray.assign]: #valarray.assign
670
+ [valarray.binary]: #valarray.binary
671
+ [valarray.cassign]: #valarray.cassign
672
+ [valarray.comparison]: #valarray.comparison
673
+ [valarray.cons]: #valarray.cons
674
+ [valarray.members]: #valarray.members
675
+ [valarray.nonmembers]: #valarray.nonmembers
676
+ [valarray.range]: #valarray.range
677
+ [valarray.special]: #valarray.special
678
+ [valarray.sub]: #valarray.sub
679
+ [valarray.syn]: #valarray.syn
680
+ [valarray.transcend]: #valarray.transcend
681
+ [valarray.unary]: #valarray.unary
682
+ [vector]: containers.md#vector
683
+
684
+ [^1]: In other words, value types. These include arithmetic types,
685
+ pointers, the library class `complex`, and instantiations of
686
+ `valarray` for value types.
687
+
688
+ [^2]: The name of this engine refers, in part, to a property of its
689
+ period: For properly-selected values of the parameters, the period
690
+ is closely related to a large Mersenne prime number.
691
+
692
+ [^3]: The parameter is intended to allow an implementation to
693
+ differentiate between different sources of randomness.
694
+
695
+ [^4]: If a device has n states whose respective probabilities are
696
+ P₀, …, Pₙ₋₁, the device entropy S is defined as
697
+ $S = - \sum_{i=0}^{n-1} P_i \cdot \log P_i$.
698
+
699
+ [^5]: b is introduced to avoid any attempt to produce more bits of
700
+ randomness than can be held in `RealType`.
701
+
702
+ [^6]: The distribution corresponding to this probability density
703
+ function is also known (with a possible change of variable) as the
704
+ Gumbel Type I, the log-Weibull, or the Fisher-Tippett Type I
705
+ distribution.
706
+
707
+ [^7]: Annex  [[implimits]] recommends a minimum number of recursively
708
+ nested template instantiations. This requirement thus indirectly
709
+ suggests a minimum allowable complexity for valarray expressions.
710
+
711
+ [^8]: The intent is to specify an array template that has the minimum
712
+ functionality necessary to address aliasing ambiguities and the
713
+ proliferation of temporaries. Thus, the `valarray` template is
714
+ neither a matrix class nor a field class. However, it is a very
715
+ useful building block for designing such classes.
716
+
717
+ [^9]: This default constructor is essential, since arrays of `valarray`
718
+ may be useful. After initialization, the length of an empty array
719
+ can be increased with the `resize` member function.
720
+
721
+ [^10]: This constructor is the preferred method for converting a C array
722
+ to a `valarray` object.
723
+
724
+ [^11]: This copy constructor creates a distinct array rather than an
725
+ alias. Implementations in which arrays share storage are permitted,
726
+ but they shall implement a copy-on-reference mechanism to ensure
727
+ that arrays are conceptually distinct.
728
+
729
+ [^12]: BLAS stands for *Basic Linear Algebra Subprograms.* C++programs
730
+ may instantiate this class. See, for example, Dongarra, Du Croz,
731
+ Duff, and Hammerling: *A set of Level 3 Basic Linear Algebra
732
+ Subprograms*; Technical Report MCS-P1-0888, Argonne National
733
+ Laboratory (USA), Mathematics and Computer Science Division, August,
734
+ 1988.
735
+
736
+ [^13]: The use of fully closed ranges is intentional.
737
+
738
+ [^14]: `accumulate` is similar to the APL reduction operator and Common
739
+ Lisp reduce function, but it avoids the difficulty of defining the
740
+ result of reduction on an empty sequence by always requiring an
741
+ initial value.
742
+
743
+ [^15]: The use of fully closed ranges is intentional.
744
+
745
+ [^16]: The use of fully closed ranges is intentional.
746
+
747
+ [^17]: The use of fully closed ranges is intentional.
748
+
749
+ [^18]: A mathematical function is mathematically defined for a given set
750
+ of argument values (a) if it is explicitly defined for that set of
751
+ argument values, or (b) if its limiting value exists and does not
752
+ depend on the direction of approach.