XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Legendre()

Function Legendre ( N As  Long,
X As  Double,
Optional Info As  Long 
)

Legendre polynomial Pn(x)

Purpose
Computes the Legendre polynomial.
Pn(x) = 1/(2^n n!) dn/dxn(x^2 - 1)^n
Returns
Double
Legendre polynomial Pn(x).
Parameters
[in]NArgument n. (0 <= N < 128)
[in]XArgument x (|X| <= 1).
[out]Info(Optional)
= 0: Successful exit.
= -1: The argument N had an illegal value. (N < 0, N >= 128)
= -2: The argument X had an illegal value. (|X| > 1)
= 1: Floating point range error.
Reference
boost/math/special_functions