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

◆ Legendre_sub()

Sub Legendre_sub ( Ret As  Double,
N As  Long,
X As  Double,
Optional Info As  Long 
)

Legendre polynomial Pn(x) (Subroutine version)

Purpose
Computes the Legendre polynomial.
Pn(x) = 1/(2^n n!) dn/dxn(x^2 - 1)^n
Parameters
[out]RetLegendre polynomial Pn(x).
[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