Here’s some C++ functions which evaluate Legendre polynomials:

P_{0}(x):

**double** P0(**double** x) ;

P_{1}(x):

**double** P1(**double** x) ;

P_{2}(x):

**double** P2(**double** x) ;

P_{n}(x):

**double** Pn(**unsigned** **int** n, **double** x) ;

These are inline functions defined in the header file, legendre.h:

(more…)