[sf.cmath]

# 29 Numerics library [[numerics]](./#numerics)

## 29.7 Mathematical functions for floating-point types [[c.math]](c.math#sf.cmath)

### 29.7.6 Mathematical special functions [sf.cmath]

#### [29.7.6.1](#general) General [[sf.cmath.general]](sf.cmath.general)

[1](#general-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L9947)

If any argument value
to any of the functions specified in [sf.cmath]
is a NaN (Not a Number),
the function shall return a NaN
but it shall not report a domain error[.](#general-1.sentence-1)

Otherwise,
the function shall report a domain error
for just those argument values
for which:

- [(1.1)](#general-1.1)

the function description's *Returns*: element
 explicitly specifies a domain
 and those argument values fall
 outside the specified domain,
 or

- [(1.2)](#general-1.2)

the corresponding mathematical function value
 has a nonzero imaginary component,
 or

- [(1.3)](#general-1.3)

the corresponding mathematical function
 is not mathematically defined[.](#general-1.sentence-2)[253](#footnote-253 "A mathematical function is mathematically defined for a given set of argument values (a) if it is explicitly defined for that set of argument values, or (b) if its limiting value exists and does not depend on the direction of approach.")

[2](#general-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L9989)

Unless otherwise specified,
each function is defined
for all finite values,
for negative infinity,
and for positive infinity[.](#general-2.sentence-1)

[253)](#footnote-253)[253)](#footnoteref-253)

A mathematical function
 is mathematically defined
 for a given set of argument values
 (a)
 if it is explicitly defined
 for that set of argument values,
 or
 (b)
 if its limiting value exists
 and does not depend
 on the direction of approach[.](#footnote-253.sentence-1)

#### [29.7.6.2](#assoc.laguerre) Associated Laguerre polynomials [[sf.cmath.assoc.laguerre]](sf.cmath.assoc.laguerre)

[ð](#lib:assoc_laguerre)

`floating-point-type assoc_laguerre(unsigned n, unsigned m, floating-point-type x);
float        assoc_laguerref(unsigned n, unsigned m, float x);
long double  assoc_laguerrel(unsigned n, unsigned m, long double x);
`

[1](#assoc.laguerre-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10009)

*Effects*: These functions compute
the associated Laguerre polynomials
of their respective argumentsn, m, and x[.](#assoc.laguerre-1.sentence-1)

[2](#assoc.laguerre-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10016)

*Returns*: Lmn(x),
where Lmn is given by Formula [29.22](#eq:sf.cmath.assoc.laguerre),Ln+m is given by Formula [29.37](#eq:sf.cmath.laguerre),n is n,m is m, andx is x[.](#assoc.laguerre-2.sentence-1)

Lmn(x)=(â1)mdmdxmLn+m(x)Â , forÂ xâ¥0(29.22)

[3](#assoc.laguerre-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10030)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if n >= 128 or if m >= 128[.](#assoc.laguerre-3.sentence-1)

#### [29.7.6.3](#assoc.legendre) Associated Legendre functions [[sf.cmath.assoc.legendre]](sf.cmath.assoc.legendre)

[ð](#lib:assoc_legendre)

`floating-point-type assoc_legendre(unsigned l, unsigned m, floating-point-type x);
float        assoc_legendref(unsigned l, unsigned m, float x);
long double  assoc_legendrel(unsigned l, unsigned m, long double x);
`

[1](#assoc.legendre-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10051)

*Effects*: These functions compute
the associated Legendre functions
of their respective argumentsl, m, and x[.](#assoc.legendre-1.sentence-1)

[2](#assoc.legendre-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10058)

*Returns*: Pâm(x),
where Pâm is given by Formula [29.23](#eq:sf.cmath.assoc.legendre),Pâ is given by Formula [29.38](#eq:sf.cmath.legendre),â is l,m is m, andx is x[.](#assoc.legendre-2.sentence-1)

Pâm(x)=(1âx2)m/2dmdxmPâ(x)Â , forÂ |x|â¤1(29.23)

[3](#assoc.legendre-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10072)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if l >= 128[.](#assoc.legendre-3.sentence-1)

#### [29.7.6.4](#beta) Beta function [[sf.cmath.beta]](sf.cmath.beta)

[ð](#lib:beta)

`floating-point-type beta(floating-point-type x, floating-point-type y);
float        betaf(float x, float y);
long double  betal(long double x, long double y);
`

[1](#beta-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10092)

*Effects*: These functions compute
the beta function
of their respective argumentsx and y[.](#beta-1.sentence-1)

[2](#beta-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10099)

*Returns*: B(x,y),
where B is given by Formula [29.24](#eq:sf.cmath.beta),x is x andy is y[.](#beta-2.sentence-1)

B(x,y)=Î(x)Î(y)Î(x+y)Â , forÂ x>0,Â y>0(29.24)

#### [29.7.6.5](#comp.ellint.1) Complete elliptic integral of the first kind [[sf.cmath.comp.ellint.1]](sf.cmath.comp.ellint.1)

[ð](#lib:comp_ellint_1)

`floating-point-type comp_ellint_1(floating-point-type k);
float        comp_ellint_1f(float k);
long double  comp_ellint_1l(long double k);
`

[1](#comp.ellint.1-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10124)

*Effects*: These functions compute
the complete elliptic integral of the first kind
of their respective argumentsk[.](#comp.ellint.1-1.sentence-1)

[2](#comp.ellint.1-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10131)

*Returns*: K(k),
where K is given by Formula [29.25](#eq:sf.cmath.comp.ellint.1) andk is k[.](#comp.ellint.1-2.sentence-1)

K(k)=F(k,Ï/2)Â , forÂ |k|â¤1(29.25)

[3](#comp.ellint.1-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10140)

See also [[sf.cmath.ellint.1]](#ellint.1 "29.7.6.12 Incomplete elliptic integral of the first kind")[.](#comp.ellint.1-3.sentence-1)

#### [29.7.6.6](#comp.ellint.2) Complete elliptic integral of the second kind [[sf.cmath.comp.ellint.2]](sf.cmath.comp.ellint.2)

[ð](#lib:comp_ellint_2)

`floating-point-type comp_ellint_2(floating-point-type k);
float        comp_ellint_2f(float k);
long double  comp_ellint_2l(long double k);
`

[1](#comp.ellint.2-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10157)

*Effects*: These functions compute
the complete elliptic integral of the second kind
of their respective argumentsk[.](#comp.ellint.2-1.sentence-1)

[2](#comp.ellint.2-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10164)

*Returns*: E(k),
where E is given by Formula [29.26](#eq:sf.cmath.comp.ellint.2) andk is k[.](#comp.ellint.2-2.sentence-1)

E(k)=E(k,Ï/2)Â , forÂ |k|â¤1(29.26)

[3](#comp.ellint.2-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10173)

See also [[sf.cmath.ellint.2]](#ellint.2 "29.7.6.13 Incomplete elliptic integral of the second kind")[.](#comp.ellint.2-3.sentence-1)

#### [29.7.6.7](#comp.ellint.3) Complete elliptic integral of the third kind [[sf.cmath.comp.ellint.3]](sf.cmath.comp.ellint.3)

[ð](#lib:comp_ellint_3)

`floating-point-type comp_ellint_3(floating-point-type k, floating-point-type nu);
float        comp_ellint_3f(float k, float nu);
long double  comp_ellint_3l(long double k, long double nu);
`

[1](#comp.ellint.3-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10190)

*Effects*: These functions compute
the complete elliptic integral of the third kind
of their respective argumentsk and nu[.](#comp.ellint.3-1.sentence-1)

[2](#comp.ellint.3-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10197)

*Returns*: Î (Î½,k),
where Î  is given by Formula [29.27](#eq:sf.cmath.comp.ellint.3),k is k, andÎ½ is nu[.](#comp.ellint.3-2.sentence-1)

Î (Î½,k)=Î (Î½,k,Ï/2)Â , forÂ |k|â¤1(29.27)

[3](#comp.ellint.3-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10207)

See also [[sf.cmath.ellint.3]](#ellint.3 "29.7.6.14 Incomplete elliptic integral of the third kind")[.](#comp.ellint.3-3.sentence-1)

#### [29.7.6.8](#cyl.bessel.i) Regular modified cylindrical Bessel functions [[sf.cmath.cyl.bessel.i]](sf.cmath.cyl.bessel.i)

[ð](#lib:cyl_bessel_i)

`floating-point-type cyl_bessel_i(floating-point-type nu, floating-point-type x);
float        cyl_bessel_if(float nu, float x);
long double  cyl_bessel_il(long double nu, long double x);
`

[1](#cyl.bessel.i-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10224)

*Effects*: These functions compute
the regular modified cylindrical Bessel functions
of their respective argumentsnu and x[.](#cyl.bessel.i-1.sentence-1)

[2](#cyl.bessel.i-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10231)

*Returns*: IÎ½(x),
where IÎ½ is given by Formula [29.28](#eq:sf.cmath.cyl.bessel.i),Î½ is nu, andx is x[.](#cyl.bessel.i-2.sentence-1)

IÎ½(x)=iâÎ½JÎ½(ix)=ââk=0(x/2)Î½+2kk!Î(Î½+k+1)Â , forÂ xâ¥0(29.28)

[3](#cyl.bessel.i-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10244)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if nu >= 128[.](#cyl.bessel.i-3.sentence-1)

[4](#cyl.bessel.i-4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10250)

See also [[sf.cmath.cyl.bessel.j]](#cyl.bessel.j "29.7.6.9 Cylindrical Bessel functions of the first kind")[.](#cyl.bessel.i-4.sentence-1)

#### [29.7.6.9](#cyl.bessel.j) Cylindrical Bessel functions of the first kind [[sf.cmath.cyl.bessel.j]](sf.cmath.cyl.bessel.j)

[ð](#lib:cyl_bessel_j)

`floating-point-type cyl_bessel_j(floating-point-type nu, floating-point-type x);
float        cyl_bessel_jf(float nu, float x);
long double  cyl_bessel_jl(long double nu, long double x);
`

[1](#cyl.bessel.j-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10268)

*Effects*: These functions compute
the cylindrical Bessel functions of the first kind
of their respective argumentsnu and x[.](#cyl.bessel.j-1.sentence-1)

[2](#cyl.bessel.j-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10275)

*Returns*: JÎ½(x),
where JÎ½ is given by Formula [29.29](#eq:sf.cmath.cyl.bessel.j),Î½ is nu, andx is x[.](#cyl.bessel.j-2.sentence-1)

JÎ½(x)=ââk=0(â1)k(x/2)Î½+2kk!Î(Î½+k+1)Â , forÂ xâ¥0(29.29)

[3](#cyl.bessel.j-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10287)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if nu >= 128[.](#cyl.bessel.j-3.sentence-1)

#### [29.7.6.10](#cyl.bessel.k) Irregular modified cylindrical Bessel functions [[sf.cmath.cyl.bessel.k]](sf.cmath.cyl.bessel.k)

[ð](#lib:cyl_bessel_k)

`floating-point-type cyl_bessel_k(floating-point-type nu, floating-point-type x);
float        cyl_bessel_kf(float nu, float x);
long double  cyl_bessel_kl(long double nu, long double x);
`

[1](#cyl.bessel.k-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10308)

*Effects*: These functions compute
the irregular modified cylindrical Bessel functions
of their respective argumentsnu and x[.](#cyl.bessel.k-1.sentence-1)

[2](#cyl.bessel.k-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10315)

*Returns*: KÎ½(x),
where KÎ½ is given by Formula [29.30](#eq:sf.cmath.cyl.bessel.k),Î½ is nu, andx is x[.](#cyl.bessel.k-2.sentence-1)

KÎ½(x)=(Ï/2)iÎ½+1(JÎ½(ix)+iNÎ½(ix))=â§âª
âª
âª
âª
âª
âª
âªâ¨âª
âª
âª
âª
âª
âª
âªâ©Ï2IâÎ½(x)âIÎ½(x)sinÎ½Ï,forÂ xâ¥0Â and non-integralÂ Î½Ï2limÎ¼âÎ½IâÎ¼(x)âIÎ¼(x)sinÎ¼Ï,forÂ xâ¥0Â and integralÂ Î½(29.30)

[3](#cyl.bessel.k-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10345)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if nu >= 128[.](#cyl.bessel.k-3.sentence-1)

[4](#cyl.bessel.k-4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10351)

See also [[sf.cmath.cyl.bessel.i]](#cyl.bessel.i "29.7.6.8 Regular modified cylindrical Bessel functions"), [[sf.cmath.cyl.bessel.j]](#cyl.bessel.j "29.7.6.9 Cylindrical Bessel functions of the first kind"), [[sf.cmath.cyl.neumann]](#cyl.neumann "29.7.6.11 Cylindrical Neumann functions")[.](#cyl.bessel.k-4.sentence-1)

#### [29.7.6.11](#cyl.neumann) Cylindrical Neumann functions [[sf.cmath.cyl.neumann]](sf.cmath.cyl.neumann)

[ð](#lib:cyl_neumann)

`floating-point-type cyl_neumann(floating-point-type nu, floating-point-type x);
float        cyl_neumannf(float nu, float x);
long double  cyl_neumannl(long double nu, long double x);
`

[1](#cyl.neumann-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10370)

*Effects*: These functions compute the cylindrical Neumann functions,
also known as the cylindrical Bessel functions of the second kind,
of their respective argumentsnu and x[.](#cyl.neumann-1.sentence-1)

[2](#cyl.neumann-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10377)

*Returns*: NÎ½(x),
where NÎ½ is given by Formula [29.31](#eq:sf.cmath.cyl.neumann),Î½ is nu, andx is x[.](#cyl.neumann-2.sentence-1)

NÎ½(x)=â§âª
âª
âª
âª
âª
âª
âªâ¨âª
âª
âª
âª
âª
âª
âªâ©JÎ½(x)cosÎ½ÏâJâÎ½(x)sinÎ½Ï,forÂ xâ¥0Â and non-integralÂ Î½limÎ¼âÎ½JÎ¼(x)cosÎ¼ÏâJâÎ¼(x)sinÎ¼Ï,forÂ xâ¥0Â and integralÂ Î½(29.31)

[3](#cyl.neumann-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10401)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if nu >= 128[.](#cyl.neumann-3.sentence-1)

[4](#cyl.neumann-4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10407)

See also [[sf.cmath.cyl.bessel.j]](#cyl.bessel.j "29.7.6.9 Cylindrical Bessel functions of the first kind")[.](#cyl.neumann-4.sentence-1)

#### [29.7.6.12](#ellint.1) Incomplete elliptic integral of the first kind [[sf.cmath.ellint.1]](sf.cmath.ellint.1)

[ð](#lib:ellint_1)

`floating-point-type ellint_1(floating-point-type k, floating-point-type phi);
float        ellint_1f(float k, float phi);
long double  ellint_1l(long double k, long double phi);
`

[1](#ellint.1-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10424)

*Effects*: These functions compute
the incomplete elliptic integral of the first kind
of their respective argumentsk and phi (phi measured in radians)[.](#ellint.1-1.sentence-1)

[2](#ellint.1-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10431)

*Returns*: F(k, Ï),
where F is given by Formula [29.32](#eq:sf.cmath.ellint.1),k is k, andÏ is phi[.](#ellint.1-2.sentence-1)

F(k,Ï)=â«Ï0dÎ¸â1âk2sin2Î¸Â , forÂ |k|â¤1(29.32)

#### [29.7.6.13](#ellint.2) Incomplete elliptic integral of the second kind [[sf.cmath.ellint.2]](sf.cmath.ellint.2)

[ð](#lib:ellint_2)

`floating-point-type ellint_2(floating-point-type k, floating-point-type phi);
float        ellint_2f(float k, float phi);
long double  ellint_2l(long double k, long double phi);
`

[1](#ellint.2-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10457)

*Effects*: These functions compute
the incomplete elliptic integral of the second kind
of their respective argumentsk and phi (phi measured in radians)[.](#ellint.2-1.sentence-1)

[2](#ellint.2-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10464)

*Returns*: E(k, Ï),
where E is given by Formula [29.33](#eq:sf.cmath.ellint.2),k is k, andÏ is phi[.](#ellint.2-2.sentence-1)

E(k,Ï)=â«Ï0â1âk2sin2Î¸dÎ¸Â , forÂ |k|â¤1(29.33)

#### [29.7.6.14](#ellint.3) Incomplete elliptic integral of the third kind [[sf.cmath.ellint.3]](sf.cmath.ellint.3)

[ð](#lib:ellint_3)

`floating-point-type ellint_3(floating-point-type k, floating-point-type nu,
                             floating-point-type phi);
float        ellint_3f(float k, float nu, float phi);
long double  ellint_3l(long double k, long double nu, long double phi);
`

[1](#ellint.3-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10491)

*Effects*: These functions compute
the incomplete elliptic integral of the third kind
of their respective argumentsk, nu, and phi (phi measured in radians)[.](#ellint.3-1.sentence-1)

[2](#ellint.3-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10498)

*Returns*: Î (Î½,k,Ï),
where Î  is given by Formula [29.34](#eq:sf.cmath.ellint.3),Î½ is nu,k is k, andÏ is phi[.](#ellint.3-2.sentence-1)

Î (Î½,k,Ï)=â«Ï0dÎ¸(1âÎ½sin2Î¸)â1âk2sin2Î¸Â , forÂ |k|â¤1(29.34)

#### [29.7.6.15](#expint) Exponential integral [[sf.cmath.expint]](sf.cmath.expint)

[ð](#lib:expint)

`floating-point-type expint(floating-point-type x);
float        expintf(float x);
long double  expintl(long double x);
`

[1](#expint-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10525)

*Effects*: These functions compute the exponential integral
of their respective argumentsx[.](#expint-1.sentence-1)

[2](#expint-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10531)

*Returns*: Ei(x),
where Ei is given by Formula [29.35](#eq:sf.cmath.expint) andx is x[.](#expint-2.sentence-1)

Ei(x)=ââ«ââxeâttdt(29.35)

#### [29.7.6.16](#hermite) Hermite polynomials [[sf.cmath.hermite]](sf.cmath.hermite)

[ð](#lib:hermite)

`floating-point-type hermite(unsigned n, floating-point-type x);
float        hermitef(unsigned n, float x);
long double  hermitel(unsigned n, long double x);
`

[1](#hermite-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10556)

*Effects*: These functions compute the Hermite polynomials
of their respective argumentsn and x[.](#hermite-1.sentence-1)

[2](#hermite-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10562)

*Returns*: Hn(x),
where Hn is given by Formula [29.36](#eq:sf.cmath.hermite),n is n, andx is x[.](#hermite-2.sentence-1)

Hn(x)=(â1)nex2dndxneâx2(29.36)

[3](#hermite-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10574)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if n >= 128[.](#hermite-3.sentence-1)

#### [29.7.6.17](#laguerre) Laguerre polynomials [[sf.cmath.laguerre]](sf.cmath.laguerre)

[ð](#lib:laguerre)

`floating-point-type laguerre(unsigned n, floating-point-type x);
float        laguerref(unsigned n, float x);
long double  laguerrel(unsigned n, long double x);
`

[1](#laguerre-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10594)

*Effects*: These functions compute the Laguerre polynomials
of their respective argumentsn and x[.](#laguerre-1.sentence-1)

[2](#laguerre-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10600)

*Returns*: Ln(x),
where Ln is given by Formula [29.37](#eq:sf.cmath.laguerre),n is n, andx is x[.](#laguerre-2.sentence-1)

Ln(x)=exn!dndxn(xneâx)Â , forÂ xâ¥0(29.37)

[3](#laguerre-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10612)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if n >= 128[.](#laguerre-3.sentence-1)

#### [29.7.6.18](#legendre) Legendre polynomials [[sf.cmath.legendre]](sf.cmath.legendre)

[ð](#lib:legendre)

`floating-point-type legendre(unsigned l, floating-point-type x);
float        legendref(unsigned l, float x);
long double  legendrel(unsigned l, long double x);
`

[1](#legendre-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10632)

*Effects*: These functions compute the Legendre polynomials of their
respective argumentsl and x[.](#legendre-1.sentence-1)

[2](#legendre-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10638)

*Returns*: Pâ(x),
where Pâ is given by Formula [29.38](#eq:sf.cmath.legendre),l is l, andx is x[.](#legendre-2.sentence-1)

Pâ(x)=12ââ!dâdxâ(x2â1)âÂ , forÂ |x|â¤1(29.38)

[3](#legendre-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10651)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if l >= 128[.](#legendre-3.sentence-1)

#### [29.7.6.19](#riemann.zeta) Riemann zeta function [[sf.cmath.riemann.zeta]](sf.cmath.riemann.zeta)

[ð](#lib:riemann_zeta)

`floating-point-type riemann_zeta(floating-point-type x);
float        riemann_zetaf(float x);
long double  riemann_zetal(long double x);
`

[1](#riemann.zeta-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10671)

*Effects*: These functions compute the Riemann zeta function
of their respective argumentsx[.](#riemann.zeta-1.sentence-1)

[2](#riemann.zeta-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10677)

*Returns*: Î¶(x),
where Î¶ is given by Formula [29.39](#eq:sf.cmath.riemann.zeta) andx is x[.](#riemann.zeta-2.sentence-1)

Î¶(x)=â§âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âªâ¨âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âª
âªâ©ââk=1kâx,forÂ x>111â21âxââk=1(â1)kâ1kâx,forÂ 0â¤xâ¤12xÏxâ1sin(Ïx2)Î(1âx)Î¶(1âx),forÂ x<0(29.39)

#### [29.7.6.20](#sph.bessel) Spherical Bessel functions of the first kind [[sf.cmath.sph.bessel]](sf.cmath.sph.bessel)

[ð](#lib:sph_bessel)

`floating-point-type sph_bessel(unsigned n, floating-point-type x);
float        sph_besself(unsigned n, float x);
long double  sph_bessell(unsigned n, long double x);
`

[1](#sph.bessel-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10719)

*Effects*: These functions compute
the spherical Bessel functions of the first kind
of their respective argumentsn and x[.](#sph.bessel-1.sentence-1)

[2](#sph.bessel-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10726)

*Returns*: jn(x),
where jn is given by Formula [29.40](#eq:sf.cmath.sph.bessel),n is n, andx is x[.](#sph.bessel-2.sentence-1)

jn(x)=(Ï/2x)1/2Jn+1/2(x)Â , forÂ xâ¥0(29.40)

[3](#sph.bessel-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10736)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if n >= 128[.](#sph.bessel-3.sentence-1)

[4](#sph.bessel-4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10742)

See also [[sf.cmath.cyl.bessel.j]](#cyl.bessel.j "29.7.6.9 Cylindrical Bessel functions of the first kind")[.](#sph.bessel-4.sentence-1)

#### [29.7.6.21](#sph.legendre) Spherical associated Legendre functions [[sf.cmath.sph.legendre]](sf.cmath.sph.legendre)

[ð](#lib:sph_legendre)

`floating-point-type sph_legendre(unsigned l, unsigned m, floating-point-type theta);
float        sph_legendref(unsigned l, unsigned m, float theta);
long double  sph_legendrel(unsigned l, unsigned m, long double theta);
`

[1](#sph.legendre-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10760)

*Effects*: These functions compute the spherical associated Legendre functions
of their respective argumentsl, m, and theta (theta measured in radians)[.](#sph.legendre-1.sentence-1)

[2](#sph.legendre-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10766)

*Returns*: Yâm(Î¸,0),
where Yâm is given by Formula [29.41](#eq:sf.cmath.sph.legendre),l is l,m is m, andÎ¸ is theta[.](#sph.legendre-2.sentence-1)

Yâm(Î¸,Ï)=(â1)m[(2â+1)4Ï(ââm)!(â+m)!]1/2Pâm(cosÎ¸)eimÏÂ , forÂ |m|â¤â(29.41)

[3](#sph.legendre-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10780)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if l >= 128[.](#sph.legendre-3.sentence-1)

[4](#sph.legendre-4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10786)

See also [[sf.cmath.assoc.legendre]](#assoc.legendre "29.7.6.3 Associated Legendre functions")[.](#sph.legendre-4.sentence-1)

#### [29.7.6.22](#sph.neumann) Spherical Neumann functions [[sf.cmath.sph.neumann]](sf.cmath.sph.neumann)

[ð](#lib:sph_neumann)

`floating-point-type sph_neumann(unsigned n, floating-point-type x);
float        sph_neumannf(unsigned n, float x);
long double  sph_neumannl(unsigned n, long double x);
`

[1](#sph.neumann-1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10804)

*Effects*: These functions compute the spherical Neumann functions,
also known as the spherical Bessel functions of the second kind,
of their respective argumentsn and x[.](#sph.neumann-1.sentence-1)

[2](#sph.neumann-2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10811)

*Returns*: nn(x),
where nn is given by Formula [29.42](#eq:sf.cmath.sph.neumann),n is n, andx is x[.](#sph.neumann-2.sentence-1)

nn(x)=(Ï/2x)1/2Nn+1/2(x)Â , forÂ xâ¥0(29.42)

[3](#sph.neumann-3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10822)

*Remarks*: The effect of calling each of these functions
is implementation-defined
if n >= 128[.](#sph.neumann-3.sentence-1)

[4](#sph.neumann-4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L10828)

See also [[sf.cmath.cyl.neumann]](#cyl.neumann "29.7.6.11 Cylindrical Neumann functions")[.](#sph.neumann-4.sentence-1)
