OrthogonalPolynomialsLegendreP(Int32, Double) Method

Computes the value of a Legendre polynomial.

Definition

Namespace: Meta.Numerics.Functions
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static double LegendreP(
	int ell,
	double x
)

Parameters

ell  Int32
The order, which must be non-negative.
x  Double
The argument, which must lie on the closed interval between -1 and +1.

Return Value

Double
The value of Pl(x).

Remarks

Legendre polynomials are orthogonal on the interval [-1,1].

The values returned by this are fully accurate (14-16 decimal digits) over the full range of arguments for orders up to one million.

Exceptions

ArgumentOutOfRangeExceptionx lies outside [-1,+1].

See Also