From Jason Turner

[sf.cmath]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp3nw_lvln/{from.md → to.md} +79 -376
tmp/tmp3nw_lvln/{from.md → to.md} RENAMED
@@ -8,54 +8,48 @@ a domain error for just those argument values for which:
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
 
@@ -68,115 +62,105 @@ 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);
@@ -209,14 +193,14 @@ Bessel functions of their respective arguments `nu` and `x`.
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);
@@ -244,13 +228,13 @@ their respective arguments `nu` and `x`.
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);
@@ -258,17 +242,15 @@ long double ellint_1l(long double k, long double phi);
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);
@@ -276,16 +258,15 @@ long double ellint_2l(long double k, long double phi);
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);
@@ -293,16 +274,13 @@ long double ellint_3l(long double k, long double nu, long double phi);
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);
@@ -348,15 +326,13 @@ 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>
@@ -368,22 +344,19 @@ 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);
@@ -413,32 +386,31 @@ respective arguments `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);
@@ -446,30 +418,23 @@ long double sph_legendrel(unsigned l, unsigned m, long double theta);
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);
@@ -477,276 +442,14 @@ long double sph_neumannl(unsigned n, long double x);
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.
 
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
27
  of their respective arguments `n`, `m`, and `x`.
28
 
29
+ *Returns:* $$\mathsf{L}_n^m(x) =
30
+ (-1)^m \frac{\mathsf{d} ^ m}{\mathsf{d}x ^ m} \, \mathsf{L}_{n+m}(x)
31
+ \text{ ,\quad for $x \ge 0$,}$$ where n is `n`, m is `m`, and x is
 
 
32
  `x`.
33
 
34
  *Remarks:* The effect of calling each of these functions is
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
46
  their respective arguments `l`, `m`, and `x`.
47
 
48
+ *Returns:* $$\mathsf{P}_\ell^m(x) = (1 - x^2) ^ {m/2} \:
49
+ \frac{\mathsf{d} ^ m}{\mathsf{d}x ^ m} \, \mathsf{P}_\ell(x)
50
+ \text{ ,\quad for $|x| \le 1$,}$$ where l is `l`, m is `m`, and x is
 
 
 
 
51
  `x`.
52
 
53
  *Remarks:* The effect of calling each of these functions is
54
  *implementation-defined* if `l >= 128`.
55
 
 
62
  ```
63
 
64
  *Effects:* These functions compute the beta function of their respective
65
  arguments `x` and `y`.
66
 
67
+ *Returns:*
68
+ $$\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
80
  first kind of their respective arguments `k`.
81
 
82
+ *Returns:*
83
+ $$\mathsf{K}(k) = \mathsf{F}(k, \pi / 2) \text{ ,\quad for $|k| \le 1$,}$$
84
+ where k is `k`.
 
85
 
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
97
  second kind of their respective arguments `k`.
98
 
99
+ *Returns:*
100
+ $$\mathsf{E}(k) = \mathsf{E}(k, \pi / 2) \text{ ,\quad for $|k| \le 1$,}$$
101
+ where k is `k`.
 
102
 
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
114
  third kind of their respective arguments `k` and `nu`.
115
 
116
+ *Returns:*
117
+ $$\mathsf{\Pi}(\nu, k) = \mathsf{\Pi}(\nu, k, \pi / 2) \text{ ,\quad for $|k| \le 1$,}$$
118
+ where k is `k` and $\nu$ is `nu`.
119
 
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
131
  Bessel functions of their respective arguments `nu` and `x`.
132
 
133
+ *Returns:* $$\mathsf{I}_\nu(x) =
134
+ i^{-\nu} \mathsf{J}_\nu(ix) =
135
+ \sum_{k=0}^\infty \frac{(x/2)^{\nu+2k}}{k! \: \Gamma(\nu+k+1)}
136
+ \text{ ,\quad for $x \ge 0$,}$$ where $\nu$ is `nu` and x is `x`.
 
 
 
137
 
138
  *Remarks:* The effect of calling each of these functions is
139
  *implementation-defined* if `nu >= 128`.
140
 
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
152
  the first kind of their respective arguments `nu` and `x`.
153
 
154
+ *Returns:* $$\mathsf{J}_\nu(x) =
155
+ \sum_{k=0}^\infty \frac{(-1)^k (x/2)^{\nu+2k}}{k! \: \Gamma(\nu+k+1)}
156
+ \text{ ,\quad for $x \ge 0$,}$$ where $\nu$ is `nu` and x is `x`.
 
 
157
 
158
  *Remarks:* The effect of calling each of these functions is
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);
 
193
  \right.$$ where $\nu$ is `nu` and x is `x`.
194
 
195
  *Remarks:* The effect of calling each of these functions is
196
  *implementation-defined* if `nu >= 128`.
197
 
198
+ 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);
 
228
  \right.$$ where $\nu$ is `nu` and x is `x`.
229
 
230
  *Remarks:* The effect of calling each of these functions is
231
  *implementation-defined* if `nu >= 128`.
232
 
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);
 
242
 
243
  *Effects:* These functions compute the incomplete elliptic integral of
244
  the first kind of their respective arguments `k` and `phi` (`phi`
245
  measured in radians).
246
 
247
+ *Returns:* $$\mathsf{F}(k, \phi) =
248
+ \int_0^\phi \! \frac{\mathsf{d}\theta}{\sqrt{1 - k^2 \sin^2 \theta}}
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);
 
258
 
259
  *Effects:* These functions compute the incomplete elliptic integral of
260
  the second kind of their respective arguments `k` and `phi` (`phi`
261
  measured in radians).
262
 
263
+ *Returns:*
264
+ $$\mathsf{E}(k, \phi) = \int_0^\phi \! \sqrt{1 - k^2 \sin^2 \theta} \, \mathsf{d}\theta
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);
 
274
 
275
  *Effects:* These functions compute the incomplete elliptic integral of
276
  the third kind of their respective arguments `k`, `nu`, and `phi` (`phi`
277
  measured in radians).
278
 
279
+ *Returns:* $$\mathsf{\Pi}(\nu, k, \phi) = \int_0^\phi \!
280
+ \frac{ \mathsf{d}\theta }{ (1 - \nu \, \sin^2 \theta) \sqrt{1 - k^2 \sin^2 \theta} } \text{ ,\quad for $|k| \le 1$,}$$
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);
 
326
  ```
327
 
328
  *Effects:* These functions compute the Laguerre polynomials of their
329
  respective arguments `n` and `x`.
330
 
331
+ *Returns:* $$\mathsf{L}_n(x) =
332
+ \frac{e^x}{n!} \frac{\mathsf{d}^n}{\mathsf{d}x^n} \, (x^n e^{-x})
333
+ \text{ ,\quad for $x \ge 0$,}$$ where n is `n` and x is `x`.
 
 
334
 
335
  *Remarks:* The effect of calling each of these functions is
336
  *implementation-defined* if `n >= 128`.
337
 
338
  #### Legendre polynomials <a id="sf.cmath.legendre">[[sf.cmath.legendre]]</a>
 
344
  ```
345
 
346
  *Effects:* These functions compute the Legendre polynomials of their
347
  respective arguments `l` and `x`.
348
 
349
+ *Returns:* $$\mathsf{P}_\ell(x) =
350
+ \frac{1}{2^\ell \, \ell!}
351
+ \frac{\mathsf{d}^\ell}{\mathsf{d}x^\ell} \, (x^2 - 1) ^ \ell
352
+ \text{ ,\quad for $|x| \le 1$,}$$ where l is `l` and x is `x`.
 
 
 
353
 
354
  *Remarks:* The effect of calling each of these functions is
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);
 
386
  & \mbox{for $x < 0$}
387
  \end{array}
388
  \right.
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
400
  first kind of their respective arguments `n` and `x`.
401
 
402
+ *Returns:*
403
+ $$\mathsf{j}_n(x) = (\pi/2x)^{1\!/\!2} \mathsf{J}_{n + 1\!/\!2}(x) \text{ ,\quad for $x \ge 0$,}$$
404
+ where n is `n` and x is `x`.
 
405
 
406
  *Remarks:* The effect of calling each of these functions is
407
  *implementation-defined* if `n >= 128`.
408
 
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);
 
418
 
419
  *Effects:* These functions compute the spherical associated Legendre
420
  functions of their respective arguments `l`, `m`, and `theta` (`theta`
421
  measured in radians).
422
 
423
+ *Returns:* $$\mathsf{Y}_\ell^m(\theta, 0)$$ where
424
+ $$\mathsf{Y}_\ell^m(\theta, \phi) =
425
+ (-1)^m \left[\frac{(2 \ell + 1)}{4 \pi} \frac{(\ell - m)!}{(\ell + m)!}\right]^{1/2}
426
+ \mathsf{P}_\ell^m (\cos\theta) e^{i m \phi}
427
+ \text{ ,\quad for $|m| \le \ell$,}$$ and l is `l`, m is `m`, and θ
 
 
 
 
 
 
 
428
  is `theta`.
429
 
430
  *Remarks:* The effect of calling each of these functions is
431
  *implementation-defined* if `l >= 128`.
432
 
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);
 
442
 
443
  *Effects:* These functions compute the spherical Neumann functions, also
444
  known as the spherical Bessel functions of the second kind, of their
445
  respective arguments `n` and `x`.
446
 
447
+ *Returns:*
448
+ $$\mathsf{n}_n(x) = (\pi/2x)^{1\!/\!2} \mathsf{N}_{n + 1\!/\!2}(x)
449
+ \text{ ,\quad for $x \ge 0$,}$$ where n is `n` and x is `x`.
 
450
 
451
  *Remarks:* The effect of calling each of these functions is
452
  *implementation-defined* if `n >= 128`.
453
 
454
+ See also [[sf.cmath.cyl.neumann]].
455