26 Numerics library [numerics]

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

26.9.5 Mathematical special functions [sf.cmath]

26.9.5.2 Associated Legendre functions [sf.cmath.assoc_legendre]

double assoc_legendre(unsigned l, unsigned m, double 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 arguments l, m, and x.

Returns: \[%
  \mathsf{P}_\ell^m(x) =
  (1 - x^2) ^ {m/2}
  \:
  \frac{ \mathsf{d} ^ m}
       { \mathsf{d}x ^ m} \, \mathsf{P}_\ell(x),
	   \quad \mbox{for $|x| \le 1$}
\] where l is l, m is m, and x is x.

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