libstdc++: Mathematical Special Functions

libstdc++

Mathematical Special Functions
Numerics
Collaboration diagram for Mathematical Special Functions:

## Functions
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | __gnu_cxx::airy_ai (_Tp __x)
float | __gnu_cxx::airy_aif (float __x)
long double | __gnu_cxx::airy_ail (long double __x)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | __gnu_cxx::airy_bi (_Tp __x)
float | __gnu_cxx::airy_bif (float __x)
long double | __gnu_cxx::airy_bil (long double __x)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::assoc_laguerre (unsigned int __n, unsigned int __m, _Tp __x)
float | std::assoc_laguerref (unsigned int __n, unsigned int __m, float __x)
long double | std::assoc_laguerrel (unsigned int __n, unsigned int __m, long double __x)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::assoc_legendre (unsigned int __l, unsigned int __m, _Tp __x)
float | std::assoc_legendref (unsigned int __l, unsigned int __m, float __x)
long double | std::assoc_legendrel (unsigned int __l, unsigned int __m, long double __x)
template<typename _Tpa, typename _Tpb>
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type | std::beta (_Tpa __a, _Tpb __b)
float | std::betaf (float __a, float __b)
long double | std::betal (long double __a, long double __b)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::comp_ellint_1 (_Tp __k)
float | std::comp_ellint_1f (float __k)
long double | std::comp_ellint_1l (long double __k)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::comp_ellint_2 (_Tp __k)
float | std::comp_ellint_2f (float __k)
long double | std::comp_ellint_2l (long double __k)
template<typename _Tp, typename _Tpn>
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type | std::comp_ellint_3 (_Tp __k, _Tpn __nu)
float | std::comp_ellint_3f (float __k, float __nu)
long double | std::comp_ellint_3l (long double __k, long double __nu)
template<typename _Tpa, typename _Tpc, typename _Tp>
__gnu_cxx::__promote_3< _Tpa, _Tpc, _Tp >::__type | __gnu_cxx::conf_hyperg (_Tpa __a, _Tpc __c, _Tp __x)
float | __gnu_cxx::conf_hypergf (float __a, float __c, float __x)
long double | __gnu_cxx::conf_hypergl (long double __a, long double __c, long double __x)
template<typename _Tpnu, typename _Tp>
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type | std::cyl_bessel_i (_Tpnu __nu, _Tp __x)
float | std::cyl_bessel_if (float __nu, float __x)
long double | std::cyl_bessel_il (long double __nu, long double __x)
template<typename _Tpnu, typename _Tp>
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type | std::cyl_bessel_j (_Tpnu __nu, _Tp __x)
float | std::cyl_bessel_jf (float __nu, float __x)
long double | std::cyl_bessel_jl (long double __nu, long double __x)
template<typename _Tpnu, typename _Tp>
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type | std::cyl_bessel_k (_Tpnu __nu, _Tp __x)
float | std::cyl_bessel_kf (float __nu, float __x)
long double | std::cyl_bessel_kl (long double __nu, long double __x)
template<typename _Tpnu, typename _Tp>
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type | std::cyl_neumann (_Tpnu __nu, _Tp __x)
float | std::cyl_neumannf (float __nu, float __x)
long double | std::cyl_neumannl (long double __nu, long double __x)
template<typename _Tp, typename _Tpp>
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type | std::ellint_1 (_Tp __k, _Tpp __phi)
float | std::ellint_1f (float __k, float __phi)
long double | std::ellint_1l (long double __k, long double __phi)
template<typename _Tp, typename _Tpp>
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type | std::ellint_2 (_Tp __k, _Tpp __phi)
float | std::ellint_2f (float __k, float __phi)
long double | std::ellint_2l (long double __k, long double __phi)
template<typename _Tp, typename _Tpn, typename _Tpp>
__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp >::__type | std::ellint_3 (_Tp __k, _Tpn __nu, _Tpp __phi)
float | std::ellint_3f (float __k, float __nu, float __phi)
long double | std::ellint_3l (long double __k, long double __nu, long double __phi)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::expint (_Tp __x)
float | std::expintf (float __x)
long double | std::expintl (long double __x)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::hermite (unsigned int __n, _Tp __x)
float | std::hermitef (unsigned int __n, float __x)
long double | std::hermitel (unsigned int __n, long double __x)
template<typename _Tpa, typename _Tpb, typename _Tpc, typename _Tp>
__gnu_cxx::__promote_4< _Tpa, _Tpb, _Tpc, _Tp >::__type | __gnu_cxx::hyperg (_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
float | __gnu_cxx::hypergf (float __a, float __b, float __c, float __x)
long double | __gnu_cxx::hypergl (long double __a, long double __b, long double __c, long double __x)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::laguerre (unsigned int __n, _Tp __x)
float | std::laguerref (unsigned int __n, float __x)
long double | std::laguerrel (unsigned int __n, long double __x)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::legendre (unsigned int __l, _Tp __x)
float | std::legendref (unsigned int __l, float __x)
long double | std::legendrel (unsigned int __l, long double __x)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::riemann_zeta (_Tp __s)
float | std::riemann_zetaf (float __s)
long double | std::riemann_zetal (long double __s)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::sph_bessel (unsigned int __n, _Tp __x)
float | std::sph_besself (unsigned int __n, float __x)
long double | std::sph_bessell (unsigned int __n, long double __x)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::sph_legendre (unsigned int __l, unsigned int __m, _Tp __theta)
float | std::sph_legendref (unsigned int __l, unsigned int __m, float __theta)
long double | std::sph_legendrel (unsigned int __l, unsigned int __m, long double __theta)
template<typename _Tp>
__gnu_cxx::__promote< _Tp >::__type | std::sph_neumann (unsigned int __n, _Tp __x)
float | std::sph_neumannf (unsigned int __n, float __x)
long double | std::sph_neumannl (unsigned int __n, long double __x)

## Detailed Description

# Mathematical Special Functions

A collection of advanced mathematical special functions, defined by ISO/IEC IS 29124 and then added to ISO C++ 2017.

## Introduction and History

The first significant library upgrade on the road to C++2011, TR1, included a set of 23 mathematical functions that significantly extended the standard transcendental functions inherited from C and declared in <cmath>.

Although most components from TR1 were eventually adopted for C++11 these math functions were left behind out of concern for implementability. The math functions were published as a separate international standard IS 29124 - Extensions to the C++ Library to Support Mathematical Special Functions.

For C++17 these functions were incorporated into the main standard.

## Contents

The following functions are implemented in namespace `std:`

- assoc_laguerre - Associated Laguerre functions
- assoc_legendre - Associated Legendre functions
- beta - Beta functions
- comp_ellint_1 - Complete elliptic functions of the first kind
- comp_ellint_2 - Complete elliptic functions of the second kind
- comp_ellint_3 - Complete elliptic functions of the third kind
- cyl_bessel_i - Regular modified cylindrical Bessel functions
- cyl_bessel_j - Cylindrical Bessel functions of the first kind
- cyl_bessel_k - Irregular modified cylindrical Bessel functions
- cyl_neumann - Cylindrical Neumann functions or Cylindrical Bessel functions of the second kind
- ellint_1 - Incomplete elliptic functions of the first kind
- ellint_2 - Incomplete elliptic functions of the second kind
- ellint_3 - Incomplete elliptic functions of the third kind
- expint - The exponential integral
- hermite - Hermite polynomials
- laguerre - Laguerre functions
- legendre - Legendre polynomials
- riemann_zeta - The Riemann zeta function
- sph_bessel - Spherical Bessel functions
- sph_legendre - Spherical Legendre functions
- sph_neumann - Spherical Neumann functions

The hypergeometric functions were stricken from the TR29124 and C++17 versions of this math library because of implementation concerns. However, since they were in the TR1 version and since they are popular we kept them as an extension in namespace `__gnu_cxx:`

- conf_hyperg - Confluent hypergeometric functions
- hyperg - Hypergeometric functions

## Argument Promotion

The arguments suppled to the non-suffixed functions will be promoted according to the following rules:

1. If any argument intended to be floating point is given an integral value That integral value is promoted to double.
2. All floating point arguments are promoted up to the largest floating point precision among them.

## NaN Arguments

If any of the floating point arguments supplied to these functions is invalid or NaN (std::numeric_limits<Tp>::quiet_NaN), the value NaN is returned.

## Implementation

We strive to implement the underlying math with type generic algorithms to the greatest extent possible. In practice, the functions are thin wrappers that dispatch to function templates. Type dependence is controlled with std::numeric_limits and functions thereof.

We don't promote `float` to `double` or `double` to long double reflexively. The goal is for `float` functions to operate more quickly, at the cost of `float` accuracy and possibly a smaller domain of validity. Similaryly, long double should give you more dynamic range and slightly more pecision than `double` on many systems.

## Testing

These functions have been tested against equivalent implementations from the Gnu Scientific Library, GSL and Boost and the ratio

is generally found to be within 10-15 for 64-bit double on linux-x86_64 systems over most of the ranges of validity.

Todo
  Provide accuracy comparisons on a per-function basis for a small number of targets.

## General Bibliography

See also
  Abramowitz and Stegun: Handbook of Mathematical Functions, with Formulas, Graphs, and Mathematical Tables Edited by Milton Abramowitz and Irene A. Stegun, National Bureau of Standards Applied Mathematics Series - 55 Issued June 1964, Tenth Printing, December 1972, with corrections Electronic versions of A&S abound including both pdf and navigable html.
  for example http://people.math.sfu.ca/~cbm/aands/
  The old A&S has been redone as the NIST Digital Library of Mathematical Functions: http://dlmf.nist.gov/ This version is far more navigable and includes more recent work.
  An Atlas of Functions: with Equator, the Atlas Function Calculator 2nd Edition, by Oldham, Keith B., Myland, Jan, Spanier, Jerome
  Asymptotics and Special Functions by Frank W. J. Olver, Academic Press, 1974
  Numerical Recipes in C, The Art of Scientific Computing, by William H. Press, Second Ed., Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery, Cambridge University Press, 1992
  The Special Functions and Their Approximations: Volumes 1 and 2, by Yudell L. Luke, Academic Press, 1969

## Function Documentation

## ◆ airy_ai()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type __gnu_cxx::airy_ai | ( | _Tp | __x | ) |
| inline

Return the Airy function of real argument x.

Definition at line 1241 of file specfun.h.

## ◆ airy_aif()

float __gnu_cxx::airy_aif | ( | float | __x | ) |
| inline

Return the Airy function of `float` argument x.

Definition at line 1218 of file specfun.h.

## ◆ airy_ail()

long double __gnu_cxx::airy_ail | ( | long double | __x | ) |
| inline

Return the Airy function of long double argument x.

Definition at line 1229 of file specfun.h.

## ◆ airy_bi()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type __gnu_cxx::airy_bi | ( | _Tp | __x | ) |
| inline

Return the Airy function of real argument x.

Definition at line 1276 of file specfun.h.

## ◆ airy_bif()

float __gnu_cxx::airy_bif | ( | float | __x | ) |
| inline

Return the Airy function of `float` argument x.

Definition at line 1253 of file specfun.h.

## ◆ airy_bil()

long double __gnu_cxx::airy_bil | ( | long double | __x | ) |
| inline

Return the Airy function of long double argument x.

Definition at line 1264 of file specfun.h.

## ◆ assoc_laguerre()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::assoc_laguerre | ( | unsigned int | __n,
|  | unsigned int | __m,
|  | _Tp | __x )
| inline

Return the associated Laguerre polynomial of nonnegative order `n`, nonnegative degree `m` and real argument `x:` .

The associated Laguerre function of real degree , , is defined by

where is the Pochhammer symbol and is the confluent hypergeometric function.

The associated Laguerre polynomial is defined for integral degree by:

where the Laguerre polynomial is defined by:

and .

See also
  laguerre for details of the Laguerre function of degree `n`

Template Parameters

  _Tp | The floating-point type of the argument `__x`.

Parameters

  __n | The order of the Laguerre function, __n >= 0.
  __m | The degree of the Laguerre function, __m >= 0.
  __x | The argument of the Laguerre function, __x >= 0.

Exceptions

  std::domain_error | if __x < 0.

Definition at line 251 of file specfun.h.

## ◆ assoc_laguerref()

float std::assoc_laguerref | ( | unsigned int | __n,
|  | unsigned int | __m,
|  | float | __x )
| inline

Return the associated Laguerre polynomial of order `n`, degree `m:` for `float` argument.

See also
  assoc_laguerre for more details.

Definition at line 205 of file specfun.h.

## ◆ assoc_laguerrel()

long double std::assoc_laguerrel | ( | unsigned int | __n,
|  | unsigned int | __m,
|  | long double | __x )
| inline

Return the associated Laguerre polynomial of order `n`, degree `m:` .

See also
  assoc_laguerre for more details.

Definition at line 215 of file specfun.h.

## ◆ assoc_legendre()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::assoc_legendre | ( | unsigned int | __l,
|  | unsigned int | __m,
|  | _Tp | __x )
| inline

Return the associated Legendre function of degree `l` and order `m`.

The associated Legendre function is derived from the Legendre function by the Rodrigues formula:

See also
  legendre for details of the Legendre function of degree `l`

Template Parameters

  _Tp | The floating-point type of the argument `__x`.

Parameters

  __l | The degree __l >= 0.
  __m | The order __m <= l.
  __x | The argument, abs(__x) <= 1.

Exceptions

  std::domain_error | if abs(__x) > 1.

Definition at line 297 of file specfun.h.

## ◆ assoc_legendref()

float std::assoc_legendref | ( | unsigned int | __l,
|  | unsigned int | __m,
|  | float | __x )
| inline

Return the associated Legendre function of degree `l` and order `m` for `float` argument.

See also
  assoc_legendre for more details.

Definition at line 266 of file specfun.h.

## ◆ assoc_legendrel()

long double std::assoc_legendrel | ( | unsigned int | __l,
|  | unsigned int | __m,
|  | long double | __x )
| inline

Return the associated Legendre function of degree `l` and order `m`.

See also
  assoc_legendre for more details.

Definition at line 275 of file specfun.h.

## ◆ beta()

template<typename _Tpa, typename _Tpb>

__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type std::beta | ( | _Tpa | __a,
|  | _Tpb | __b )
| inline

Return the beta function, , for real parameters `a`, `b`.

The beta function is defined by

where and

Template Parameters

  _Tpa | The floating-point type of the parameter `__a`.
  _Tpb | The floating-point type of the parameter `__b`.

Parameters

  __a | The first argument of the beta function, __a > 0 .
  __b | The second argument of the beta function, __b > 0 .

Exceptions

  std::domain_error | if __a < 0 or __b < 0 .

Definition at line 342 of file specfun.h.

## ◆ betaf()

float std::betaf | ( | float | __a,
|  | float | __b )
| inline

Return the beta function, , for `float` parameters `a`, `b`.

See also
  beta for more details.

Definition at line 311 of file specfun.h.

## ◆ betal()

long double std::betal | ( | long double | __a,
|  | long double | __b )
| inline

Return the beta function, , for long double parameters `a`, `b`.

See also
  beta for more details.

Definition at line 321 of file specfun.h.

## ◆ comp_ellint_1()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::comp_ellint_1 | ( | _Tp | __k | ) |
| inline

Return the complete elliptic integral of the first kind for real modulus `k`.

The complete elliptic integral of the first kind is defined as

where is the incomplete elliptic integral of the first kind and the modulus .

See also
  ellint_1 for details of the incomplete elliptic function of the first kind.

Template Parameters

  _Tp | The floating-point type of the modulus `__k`.

Parameters

  __k | The modulus, abs(__k) <= 1

Exceptions

  std::domain_error | if abs(__k) > 1 .

Definition at line 390 of file specfun.h.

## ◆ comp_ellint_1f()

float std::comp_ellint_1f | ( | float | __k | ) |
| inline

Return the complete elliptic integral of the first kind for `float` modulus `k`.

See also
  comp_ellint_1 for details.

Definition at line 357 of file specfun.h.

## ◆ comp_ellint_1l()

long double std::comp_ellint_1l | ( | long double | __k | ) |
| inline

Return the complete elliptic integral of the first kind for long double modulus `k`.

See also
  comp_ellint_1 for details.

Definition at line 367 of file specfun.h.

## ◆ comp_ellint_2()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::comp_ellint_2 | ( | _Tp | __k | ) |
| inline

Return the complete elliptic integral of the second kind for real modulus `k`.

The complete elliptic integral of the second kind is defined as

where is the incomplete elliptic integral of the second kind and the modulus .

See also
  ellint_2 for details of the incomplete elliptic function of the second kind.

Template Parameters

  _Tp | The floating-point type of the modulus `__k`.

Parameters

  __k | The modulus, `abs(__k)` <= 1

Exceptions

  std::domain_error | if `abs(__k)` > 1.

Definition at line 437 of file specfun.h.

## ◆ comp_ellint_2f()

float std::comp_ellint_2f | ( | float | __k | ) |
| inline

Return the complete elliptic integral of the second kind for `float` modulus `k`.

See also
  comp_ellint_2 for details.

Definition at line 405 of file specfun.h.

## ◆ comp_ellint_2l()

long double std::comp_ellint_2l | ( | long double | __k | ) |
| inline

Return the complete elliptic integral of the second kind for long double modulus `k`.

See also
  comp_ellint_2 for details.

Definition at line 415 of file specfun.h.

## ◆ comp_ellint_3()

template<typename _Tp, typename _Tpn>

__gnu_cxx::__promote_2< _Tp, _Tpn >::__type std::comp_ellint_3 | ( | _Tp | __k,
|  | _Tpn | __nu )
| inline

Return the complete elliptic integral of the third kind for real modulus `k`.

The complete elliptic integral of the third kind is defined as

where is the incomplete elliptic integral of the second kind and the modulus .

See also
  ellint_3 for details of the incomplete elliptic function of the third kind.

Template Parameters

  _Tp | The floating-point type of the modulus `__k`.
  _Tpn | The floating-point type of the argument `__nu`.

Parameters

  __k | The modulus, `abs(__k)` <= 1
  __nu | The argument

Exceptions

  std::domain_error | if `abs(__k)` > 1.

Definition at line 488 of file specfun.h.

## ◆ comp_ellint_3f()

float std::comp_ellint_3f | ( | float | __k,
|  | float | __nu )
| inline

Return the complete elliptic integral of the third kind for `float` modulus `k`.

See also
  comp_ellint_3 for details.

Definition at line 452 of file specfun.h.

## ◆ comp_ellint_3l()

long double std::comp_ellint_3l | ( | long double | __k,
|  | long double | __nu )
| inline

Return the complete elliptic integral of the third kind for long double modulus `k`.

See also
  comp_ellint_3 for details.

Definition at line 462 of file specfun.h.

## ◆ conf_hyperg()

template<typename _Tpa, typename _Tpc, typename _Tp>

__gnu_cxx::__promote_3< _Tpa, _Tpc, _Tp >::__type __gnu_cxx::conf_hyperg | ( | _Tpa | __a,
|  | _Tpc | __c,
|  | _Tp | __x )
| inline

Return the confluent hypergeometric function of real numeratorial parameter `a`, denominatorial parameter `c`, and argument `x`.

The confluent hypergeometric function is defined by

where the Pochhammer symbol is ,

Parameters

  __a | The numeratorial parameter
  __c | The denominatorial parameter
  __x | The argument

Definition at line 1326 of file specfun.h.

## ◆ conf_hypergf()

float __gnu_cxx::conf_hypergf | ( | float | __a,
|  | float | __c,
|  | float | __x )
| inline

Return the confluent hypergeometric function of `float` numeratorial parameter `a`, denominatorial parameter `c`, and argument `x`.

See also
  conf_hyperg for details.

Definition at line 1294 of file specfun.h.

## ◆ conf_hypergl()

long double __gnu_cxx::conf_hypergl | ( | long double | __a,
|  | long double | __c,
|  | long double | __x )
| inline

Return the confluent hypergeometric function of long double numeratorial parameter `a`, denominatorial parameter `c`, and argument `x`.

See also
  conf_hyperg for details.

Definition at line 1305 of file specfun.h.

## ◆ cyl_bessel_i()

template<typename _Tpnu, typename _Tp>

__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_bessel_i | ( | _Tpnu | __nu,
|  | _Tp | __x )
| inline

Return the regular modified Bessel function for real order and argument .

The regular modified cylindrical Bessel function is:

Template Parameters

  _Tpnu | The floating-point type of the order `__nu`.
  _Tp | The floating-point type of the argument `__x`.

Parameters

  __nu | The order
  __x | The argument, __x >= 0

Exceptions

  std::domain_error | if __x < 0 .

Definition at line 534 of file specfun.h.

## ◆ cyl_bessel_if()

float std::cyl_bessel_if | ( | float | __nu,
|  | float | __x )
| inline

Return the regular modified Bessel function for `float` order and argument .

See also
  cyl_bessel_i for setails.

Definition at line 503 of file specfun.h.

## ◆ cyl_bessel_il()

long double std::cyl_bessel_il | ( | long double | __nu,
|  | long double | __x )
| inline

Return the regular modified Bessel function for long double order and argument .

See also
  cyl_bessel_i for setails.

Definition at line 513 of file specfun.h.

## ◆ cyl_bessel_j()

template<typename _Tpnu, typename _Tp>

__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_bessel_j | ( | _Tpnu | __nu,
|  | _Tp | __x )
| inline

Return the Bessel function of real order and argument .

The cylindrical Bessel function is:

Template Parameters

  _Tpnu | The floating-point type of the order `__nu`.
  _Tp | The floating-point type of the argument `__x`.

Parameters

  __nu | The order
  __x | The argument, __x >= 0

Exceptions

  std::domain_error | if __x < 0 .

Definition at line 580 of file specfun.h.

## ◆ cyl_bessel_jf()

float std::cyl_bessel_jf | ( | float | __nu,
|  | float | __x )
| inline

Return the Bessel function of the first kind for `float` order and argument .

See also
  cyl_bessel_j for setails.

Definition at line 549 of file specfun.h.

## ◆ cyl_bessel_jl()

long double std::cyl_bessel_jl | ( | long double | __nu,
|  | long double | __x )
| inline

Return the Bessel function of the first kind for long double order and argument .

See also
  cyl_bessel_j for setails.

Definition at line 559 of file specfun.h.

## ◆ cyl_bessel_k()

template<typename _Tpnu, typename _Tp>

__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_bessel_k | ( | _Tpnu | __nu,
|  | _Tp | __x )
| inline

Return the irregular modified Bessel function of real order and argument .

The irregular modified Bessel function is defined by:

where for integral a limit is taken: . For negative argument we have simply:

Template Parameters

  _Tpnu | The floating-point type of the order `__nu`.
  _Tp | The floating-point type of the argument `__x`.

Parameters

  __nu | The order
  __x | The argument, __x >= 0

Exceptions

  std::domain_error | if __x < 0 .

Definition at line 632 of file specfun.h.

## ◆ cyl_bessel_kf()

float std::cyl_bessel_kf | ( | float | __nu,
|  | float | __x )
| inline

Return the irregular modified Bessel function for `float` order and argument .

See also
  cyl_bessel_k for setails.

Definition at line 595 of file specfun.h.

## ◆ cyl_bessel_kl()

long double std::cyl_bessel_kl | ( | long double | __nu,
|  | long double | __x )
| inline

Return the irregular modified Bessel function for long double order and argument .

See also
  cyl_bessel_k for setails.

Definition at line 605 of file specfun.h.

## ◆ cyl_neumann()

template<typename _Tpnu, typename _Tp>

__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type std::cyl_neumann | ( | _Tpnu | __nu,
|  | _Tp | __x )
| inline

Return the Neumann function of real order and argument .

The Neumann function is defined by:

where and for integral order a limit is taken: .

Template Parameters

  _Tpnu | The floating-point type of the order `__nu`.
  _Tp | The floating-point type of the argument `__x`.

Parameters

  __nu | The order
  __x | The argument, __x >= 0

Exceptions

  std::domain_error | if __x < 0 .

Definition at line 680 of file specfun.h.

## ◆ cyl_neumannf()

float std::cyl_neumannf | ( | float | __nu,
|  | float | __x )
| inline

Return the Neumann function of `float` order and argument .

See also
  cyl_neumann for setails.

Definition at line 647 of file specfun.h.

## ◆ cyl_neumannl()

long double std::cyl_neumannl | ( | long double | __nu,
|  | long double | __x )
| inline

Return the Neumann function of long double order and argument .

See also
  cyl_neumann for setails.

Definition at line 657 of file specfun.h.

## ◆ ellint_1()

template<typename _Tp, typename _Tpp>

__gnu_cxx::__promote_2< _Tp, _Tpp >::__type std::ellint_1 | ( | _Tp | __k,
|  | _Tpp | __phi )
| inline

Return the incomplete elliptic integral of the first kind for `real` modulus and angle .

The incomplete elliptic integral of the first kind is defined as

For this becomes the complete elliptic integral of the first kind, .

See also
  comp_ellint_1.

Template Parameters

  _Tp | The floating-point type of the modulus `__k`.
  _Tpp | The floating-point type of the angle `__phi`.

Parameters

  __k | The modulus, abs(__k) <= 1
  __phi | The integral limit argument in radians

Exceptions

  std::domain_error | if abs(__k) > 1 .

Definition at line 728 of file specfun.h.

## ◆ ellint_1f()

float std::ellint_1f | ( | float | __k,
|  | float | __phi )
| inline

Return the incomplete elliptic integral of the first kind for `float` modulus and angle .

See also
  ellint_1 for details.

Definition at line 695 of file specfun.h.

## ◆ ellint_1l()

long double std::ellint_1l | ( | long double | __k,
|  | long double | __phi )
| inline

Return the incomplete elliptic integral of the first kind for long double modulus and angle .

See also
  ellint_1 for details.

Definition at line 705 of file specfun.h.

## ◆ ellint_2()

template<typename _Tp, typename _Tpp>

__gnu_cxx::__promote_2< _Tp, _Tpp >::__type std::ellint_2 | ( | _Tp | __k,
|  | _Tpp | __phi )
| inline

Return the incomplete elliptic integral of the second kind .

The incomplete elliptic integral of the second kind is defined as

For this becomes the complete elliptic integral of the second kind, .

See also
  comp_ellint_2.

Template Parameters

  _Tp | The floating-point type of the modulus `__k`.
  _Tpp | The floating-point type of the angle `__phi`.

Parameters

  __k | The modulus, abs(__k) <= 1
  __phi | The integral limit argument in radians

Returns
  The elliptic function of the second kind.

Exceptions

  std::domain_error | if abs(__k) > 1 .

Definition at line 776 of file specfun.h.

## ◆ ellint_2f()

float std::ellint_2f | ( | float | __k,
|  | float | __phi )
| inline

Return the incomplete elliptic integral of the second kind for `float` argument.

See also
  ellint_2 for details.

Definition at line 743 of file specfun.h.

## ◆ ellint_2l()

long double std::ellint_2l | ( | long double | __k,
|  | long double | __phi )
| inline

Return the incomplete elliptic integral of the second kind .

See also
  ellint_2 for details.

Definition at line 753 of file specfun.h.

## ◆ ellint_3()

template<typename _Tp, typename _Tpn, typename _Tpp>

__gnu_cxx::__promote_3< _Tp, _Tpn, _Tpp >::__type std::ellint_3 | ( | _Tp | __k,
|  | _Tpn | __nu,
|  | _Tpp | __phi )
| inline

Return the incomplete elliptic integral of the third kind .

The incomplete elliptic integral of the third kind is defined by:

For this becomes the complete elliptic integral of the third kind, .

See also
  comp_ellint_3.

Template Parameters

  _Tp | The floating-point type of the modulus `__k`.
  _Tpn | The floating-point type of the argument `__nu`.
  _Tpp | The floating-point type of the angle `__phi`.

Parameters

  __k | The modulus, abs(__k) <= 1
  __nu | The second argument
  __phi | The integral limit argument in radians

Returns
  The elliptic function of the third kind.

Exceptions

  std::domain_error | if abs(__k) > 1 .

Definition at line 829 of file specfun.h.

## ◆ ellint_3f()

float std::ellint_3f | ( | float | __k,
|  | float | __nu,
|  | float | __phi )
| inline

Return the incomplete elliptic integral of the third kind for `float` argument.

See also
  ellint_3 for details.

Definition at line 791 of file specfun.h.

## ◆ ellint_3l()

long double std::ellint_3l | ( | long double | __k,
|  | long double | __nu,
|  | long double | __phi )
| inline

Return the incomplete elliptic integral of the third kind .

See also
  ellint_3 for details.

Definition at line 801 of file specfun.h.

## ◆ expint()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::expint | ( | _Tp | __x | ) |
| inline

Return the exponential integral for `real` argument `x`.

The exponential integral is given by

Template Parameters

  _Tp | The floating-point type of the argument `__x`.

Parameters

  __x | The argument of the exponential integral function.

Definition at line 869 of file specfun.h.

## ◆ expintf()

float std::expintf | ( | float | __x | ) |
| inline

Return the exponential integral for `float` argument `x`.

See also
  expint for details.

Definition at line 843 of file specfun.h.

## ◆ expintl()

long double std::expintl | ( | long double | __x | ) |
| inline

Return the exponential integral for long double argument `x`.

See also
  expint for details.

Definition at line 853 of file specfun.h.

## ◆ hermite()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::hermite | ( | unsigned int | __n,
|  | _Tp | __x )
| inline

Return the Hermite polynomial of order n and `real` argument `x`.

The Hermite polynomial is defined by:

The Hermite polynomial obeys a reflection formula:

Template Parameters

  _Tp | The floating-point type of the argument `__x`.

Parameters

  __n | The order
  __x | The argument

Definition at line 917 of file specfun.h.

## ◆ hermitef()

float std::hermitef | ( | unsigned int | __n,
|  | float | __x )
| inline

Return the Hermite polynomial of nonnegative order n and float argument `x`.

See also
  hermite for details.

Definition at line 884 of file specfun.h.

## ◆ hermitel()

long double std::hermitel | ( | unsigned int | __n,
|  | long double | __x )
| inline

Return the Hermite polynomial of nonnegative order n and long double argument `x`.

See also
  hermite for details.

Definition at line 894 of file specfun.h.

## ◆ hyperg()

template<typename _Tpa, typename _Tpb, typename _Tpc, typename _Tp>

__gnu_cxx::__promote_4< _Tpa, _Tpb, _Tpc, _Tp >::__type __gnu_cxx::hyperg | ( | _Tpa | __a,
|  | _Tpb | __b,
|  | _Tpc | __c,
|  | _Tp | __x )
| inline

Return the hypergeometric function of real numeratorial parameters `a` and `b`, denominatorial parameter `c`, and argument `x`.

The hypergeometric function is defined by

where the Pochhammer symbol is ,

Parameters

  __a | The first numeratorial parameter
  __b | The second numeratorial parameter
  __c | The denominatorial parameter
  __x | The argument

Definition at line 1375 of file specfun.h.

## ◆ hypergf()

float __gnu_cxx::hypergf | ( | float | __a,
|  | float | __b,
|  | float | __c,
|  | float | __x )
| inline

Return the hypergeometric function of @ float numeratorial parameters `a` and `b`, denominatorial parameter `c`, and argument `x`.

See also
  hyperg for details.

Definition at line 1342 of file specfun.h.

## ◆ hypergl()

long double __gnu_cxx::hypergl | ( | long double | __a,
|  | long double | __b,
|  | long double | __c,
|  | long double | __x )
| inline

Return the hypergeometric function of long double numeratorial parameters `a` and `b`, denominatorial parameter `c`, and argument `x`.

See also
  hyperg for details.

Definition at line 1353 of file specfun.h.

## ◆ laguerre()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::laguerre | ( | unsigned int | __n,
|  | _Tp | __x )
| inline

Returns the Laguerre polynomial of nonnegative degree `n` and real argument .

The Laguerre polynomial is defined by:

Template Parameters

  _Tp | The floating-point type of the argument `__x`.

Parameters

  __n | The nonnegative order
  __x | The argument __x >= 0

Exceptions

  std::domain_error | if __x < 0 .

Definition at line 961 of file specfun.h.

## ◆ laguerref()

float std::laguerref | ( | unsigned int | __n,
|  | float | __x )
| inline

Returns the Laguerre polynomial of nonnegative degree `n` and `float` argument .

See also
  laguerre for more details.

Definition at line 932 of file specfun.h.

## ◆ laguerrel()

long double std::laguerrel | ( | unsigned int | __n,
|  | long double | __x )
| inline

Returns the Laguerre polynomial of nonnegative degree `n` and long double argument .

See also
  laguerre for more details.

Definition at line 942 of file specfun.h.

## ◆ legendre()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::legendre | ( | unsigned int | __l,
|  | _Tp | __x )
| inline

Return the Legendre polynomial of nonnegative degree and real argument .

The Legendre function of order and argument , , is defined by:

Template Parameters

  _Tp | The floating-point type of the argument `__x`.

Parameters

  __l | The degree
  __x | The argument `abs(__x)` <= 1

Exceptions

  std::domain_error | if `abs(__x)` > 1

Definition at line 1006 of file specfun.h.

## ◆ legendref()

float std::legendref | ( | unsigned int | __l,
|  | float | __x )
| inline

Return the Legendre polynomial of nonnegative degree and `float` argument .

See also
  legendre for more details.

Definition at line 976 of file specfun.h.

## ◆ legendrel()

long double std::legendrel | ( | unsigned int | __l,
|  | long double | __x )
| inline

Return the Legendre polynomial of nonnegative degree and long double argument .

See also
  legendre for more details.

Definition at line 986 of file specfun.h.

## ◆ riemann_zeta()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::riemann_zeta | ( | _Tp | __s | ) |
| inline

Return the Riemann zeta function for real argument .

The Riemann zeta function is defined by:

and

For s < 1 use the reflection formula:

Template Parameters

  _Tp | The floating-point type of the argument `__s`.

Parameters

  __s | The argument s != 1

Definition at line 1057 of file specfun.h.

## ◆ riemann_zetaf()

float std::riemann_zetaf | ( | float | __s | ) |
| inline

Return the Riemann zeta function for `float` argument .

See also
  riemann_zeta for more details.

Definition at line 1021 of file specfun.h.

## ◆ riemann_zetal()

long double std::riemann_zetal | ( | long double | __s | ) |
| inline

Return the Riemann zeta function for long double argument .

See also
  riemann_zeta for more details.

Definition at line 1031 of file specfun.h.

## ◆ sph_bessel()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::sph_bessel | ( | unsigned int | __n,
|  | _Tp | __x )
| inline

Return the spherical Bessel function of nonnegative order n and real argument .

The spherical Bessel function is defined by:

Template Parameters

  _Tp | The floating-point type of the argument `__x`.

Parameters

  __n | The integral order n >= 0
  __x | The real argument x >= 0

Exceptions

  std::domain_error | if __x < 0 .

Definition at line 1101 of file specfun.h.

## ◆ sph_besself()

float std::sph_besself | ( | unsigned int | __n,
|  | float | __x )
| inline

Return the spherical Bessel function of nonnegative order n and `float` argument .

See also
  sph_bessel for more details.

Definition at line 1072 of file specfun.h.

## ◆ sph_bessell()

long double std::sph_bessell | ( | unsigned int | __n,
|  | long double | __x )
| inline

Return the spherical Bessel function of nonnegative order n and long double argument .

See also
  sph_bessel for more details.

Definition at line 1082 of file specfun.h.

## ◆ sph_legendre()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::sph_legendre | ( | unsigned int | __l,
|  | unsigned int | __m,
|  | _Tp | __theta )
| inline

Return the spherical Legendre function of nonnegative integral degree `l` and order `m` and real angle in radians.

The spherical Legendre function is defined by

Template Parameters

  _Tp | The floating-point type of the angle `__theta`.

Parameters

  __l | The order __l >= 0
  __m | The degree __m >= 0 and __m <= __l
  __theta | The radian polar angle argument

Definition at line 1148 of file specfun.h.

## ◆ sph_legendref()

float std::sph_legendref | ( | unsigned int | __l,
|  | unsigned int | __m,
|  | float | __theta )
| inline

Return the spherical Legendre function of nonnegative integral degree `l` and order `m` and float angle in radians.

See also
  sph_legendre for details.

Definition at line 1116 of file specfun.h.

## ◆ sph_legendrel()

long double std::sph_legendrel | ( | unsigned int | __l,
|  | unsigned int | __m,
|  | long double | __theta )
| inline

Return the spherical Legendre function of nonnegative integral degree `l` and order `m` and long double angle in radians.

See also
  sph_legendre for details.

Definition at line 1127 of file specfun.h.

## ◆ sph_neumann()

template<typename _Tp>

__gnu_cxx::__promote< _Tp >::__type std::sph_neumann | ( | unsigned int | __n,
|  | _Tp | __x )
| inline

Return the spherical Neumann function of integral order and real argument .

The spherical Neumann function is defined by

Template Parameters

  _Tp | The floating-point type of the argument `__x`.

Parameters

  __n | The integral order n >= 0
  __x | The real argument __x >= 0

Exceptions

  std::domain_error | if __x < 0 .

Definition at line 1192 of file specfun.h.

## ◆ sph_neumannf()

float std::sph_neumannf | ( | unsigned int | __n,
|  | float | __x )
| inline

Return the spherical Neumann function of integral order and `float` argument .

See also
  sph_neumann for details.

Definition at line 1163 of file specfun.h.

## ◆ sph_neumannl()

long double std::sph_neumannl | ( | unsigned int | __n,
|  | long double | __x )
| inline

Return the spherical Neumann function of integral order and long double .

See also
  sph_neumann for details.

Definition at line 1173 of file specfun.h.