28 Numerics library [numerics]

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

28.7.6 Mathematical special functions [sf.cmath]

28.7.6.18 Legendre polynomials [sf.cmath.legendre]

floating-point-type legendre(unsigned l, floating-point-type 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.
Returns:
where l is l and x is x.
Remarks: The effect of calling each of these functions is implementation-defined if l >= 128.