XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ alegendre()

double alegendre ( unsigned int  n,
unsigned int  m,
double  x 
)

Associated Legendre polynomial Pnm(x)

Purpose
alegendre computes the associated Legendre polynomial.
Pnm(x) = (-1)^m (1 - x^2)^(m/2) dm/dxm Pn(x)
Note that the term (-1)^m may not be included depending on the definition.
Returns
Associated Legendre polynomial Pnm(x).
Parameters
[in]nDegree of polynomial n.
[in]mOrder of polynomial m.
[in]xArgument x (|x| <= 1).
Error handling
  • If |x| > 1, domain error (EDOM) occurs.
  • Range error (ERANGE) may occur.
Note
  • Note that the worst errors occur when the degree increases, values greater than ~120 are very unlikely to produce sensible results, especially when the order is also large. Further the relative errors are likely to grow arbitrarily large when the function is very close to a root.
Reference
boost/math/special_functions