*floating-point-type* sph_legendre(unsigned l, unsigned m, *floating-point-type* theta);
float sph_legendref(unsigned l, unsigned m, float theta);
long double sph_legendrel(unsigned l, unsigned m, long double theta);

See also [sf.cmath.assoc.legendre].