OrthogonalPolynomialsLegendreP(Int32, Int32, Double) Method

Computes the value of an associated 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,
	int m,
	double x
)

Parameters

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

Return Value

Double
The value of Pl,m(x).

Remarks

Associated Legendre polynomials appear in the definition of the SphericalHarmonic(Int32, Int32, Double, Double) functions.

For values of l and m over about 150, values of this polynomial can exceed the capacity of double-wide floating point numbers.

Exceptions

ArgumentOutOfRangeExceptionell is negative, m lies outside {-ℓ .. +ℓ}, or x lies outside [-1, +1].

See Also