double sph_legendre(unsigned l, unsigned m, double 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 arguments l, m, and theta (theta measured in radians).
Returns:
Ymℓ(θ,0)
where
Ymℓ(θ,ϕ)=(−1)m[(2ℓ+1)4π(ℓ−m)!(ℓ+m)!]1/2Pmℓ(cosθ)eimϕ,for |m|≤ℓ
and l is l, m is m, and θ is theta.
See also [sf.cmath.assoc_legendre].