[sf.cmath] (original) (raw)

28 Numerics library [numerics]

28.7 Mathematical functions for floating-point types [c.math]

28.7.6 Mathematical special functions [sf.cmath]

28.7.6.1 General [sf.cmath.general]

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.

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

Unless otherwise specified, each function is defined for all finite values, for negative infinity, and for positive infinity.

28.7.6.2 Associated Laguerre polynomials [sf.cmath.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);

Effects: These functions compute the associated Laguerre polynomials of their respective argumentsn, m, and x.

Returns: , where is given by Formula 28.22,n is n,m is m, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if n >= 128 or if m >= 128.

28.7.6.3 Associated Legendre functions [sf.cmath.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);

Effects: These functions compute the associated Legendre functions of their respective argumentsl, m, and x.

Returns: , where is given by Formula 28.23,l is l,m is m, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if l >= 128.

28.7.6.4 Beta function [sf.cmath.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);

Effects: These functions compute the beta function of their respective argumentsx and y.

Returns: , where B is given by Formula 28.24,x is x andy is y.

28.7.6.5 Complete elliptic integral of the first kind [sf.cmath.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);

Effects: These functions compute the complete elliptic integral of the first kind of their respective argumentsk.

Returns: K(k), where K is given by Formula 28.25 andk is k.

28.7.6.6 Complete elliptic integral of the second kind [sf.cmath.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);

Effects: These functions compute the complete elliptic integral of the second kind of their respective argumentsk.

Returns: E(k), where E is given by Formula 28.26 andk is k.

28.7.6.7 Complete elliptic integral of the third kind [sf.cmath.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);

Effects: These functions compute the complete elliptic integral of the third kind of their respective argumentsk and nu.

Returns: , where Π is given by Formula 28.27,k is k, andν is nu.

28.7.6.8 Regular modified cylindrical Bessel functions [sf.cmath.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);

Effects: These functions compute the regular modified cylindrical Bessel functions of their respective argumentsnu and x.

Returns: , where is given by Formula 28.28,ν is nu, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if nu >= 128.

28.7.6.9 Cylindrical Bessel functions of the first kind [sf.cmath.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);

Effects: These functions compute the cylindrical Bessel functions of the first kind of their respective argumentsnu and x.

Returns: , where is given by Formula 28.29,ν is nu, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if nu >= 128.

28.7.6.10 Irregular modified cylindrical Bessel functions [sf.cmath.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);

Effects: These functions compute the irregular modified cylindrical Bessel functions of their respective argumentsnu and x.

Returns: , where is given by Formula 28.30,ν is nu, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if nu >= 128.

28.7.6.11 Cylindrical Neumann functions [sf.cmath.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);

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.

Returns: , where is given by Formula 28.31,ν is nu, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if nu >= 128.

28.7.6.12 Incomplete elliptic integral of the first kind [sf.cmath.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);

Effects: These functions compute the incomplete elliptic integral of the first kind of their respective argumentsk and phi (phi measured in radians).

Returns: F(k, φ), where F is given by Formula 28.32,k is k, andφ is phi.

28.7.6.13 Incomplete elliptic integral of the second kind [sf.cmath.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);

Effects: These functions compute the incomplete elliptic integral of the second kind of their respective argumentsk and phi (phi measured in radians).

Returns: E(k, φ), where E is given by Formula 28.33,k is k, andφ is phi.

28.7.6.14 Incomplete elliptic integral of the third kind [sf.cmath.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);

Effects: These functions compute the incomplete elliptic integral of the third kind of their respective argumentsk, nu, and phi (phi measured in radians).

Returns: , where Π is given by Formula 28.34,ν is nu,k is k, andφ is phi.

28.7.6.15 Exponential integral [sf.cmath.expint]

_floating-point-type_ expint(_floating-point-type_ x);float expintf(float x);long double expintl(long double x);

Effects: These functions compute the exponential integral of their respective argumentsx.

Returns: Ei(x), where Ei is given by Formula 28.35 andx is x.

28.7.6.16 Hermite polynomials [sf.cmath.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);

Effects: These functions compute the Hermite polynomials of their respective argumentsn and x.

Returns: , where is given by Formula 28.36,n is n, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if n >= 128.

28.7.6.17 Laguerre polynomials [sf.cmath.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);

Effects: These functions compute the Laguerre polynomials of their respective argumentsn and x.

Returns: , where is given by Formula 28.37,n is n, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if n >= 128.

28.7.6.18 Legendre polynomials [sf.cmath.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);

Effects: These functions compute the Legendre polynomials of their respective argumentsl and x.

Returns: , where is given by Formula 28.38,l is l, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if l >= 128.

28.7.6.19 Riemann zeta function [sf.cmath.riemann.zeta]

_floating-point-type_ riemann_zeta(_floating-point-type_ x);float riemann_zetaf(float x);long double riemann_zetal(long double x);

Effects: These functions compute the Riemann zeta function of their respective argumentsx.

Returns: ζ(x), where ζ is given by Formula 28.39 andx is x.

28.7.6.20 Spherical Bessel functions of the first kind [sf.cmath.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);

Effects: These functions compute the spherical Bessel functions of the first kind of their respective argumentsn and x.

Returns: , where is given by Formula 28.40,n is n, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if n >= 128.

28.7.6.21 Spherical associated Legendre functions [sf.cmath.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);

Effects: These functions compute the spherical associated Legendre functions of their respective argumentsl, m, and theta (theta measured in radians).

Returns: , where is given by Formula 28.41,l is l,m is m, andθ is theta.

Remarks: The effect of calling each of these functions is implementation-defined if l >= 128.

28.7.6.22 Spherical Neumann functions [sf.cmath.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);

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.

Returns: , where is given by Formula 28.42,n is n, andx is x.

Remarks: The effect of calling each of these functions is implementation-defined if n >= 128.