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);

Pℓm(x)=(1−x2)m/2dmdxmPℓ(x) , for |x|≤1,

where l is l, m is m, and x is x.