25 Numerics library [numerics]

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

25.8.5 Mathematical special functions [sf.cmath] Legendre polynomials [sf.cmath.legendre]

double legendre(unsigned l, double x); float legendref(unsigned l, float x); long double legendrel(unsigned l, long double x);
Effects: These functions compute the Legendre polynomials of their respective arguments l and x.
where l is l and x is x.
Remarks: The effect of calling each of these functions is implementation-defined if l >= 128.