Click or drag to resize

AdvancedMathLogGamma Method

Computes the natural logarithm of the Gamma function.

Namespace:  Meta.Numerics.Functions
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.0.5.0 (4.0.5.0)
Syntax
public static double LogGamma(
	double x
)

Parameters

x
Type: SystemDouble
The argument, which must be positive.

Return Value

Type: Double
The log Gamma function ln(Γ(x)).
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionx is negative or zero.
Remarks

Because Γ(x) grows rapidly for increasing positive x, it is often necessary to work with its logarithm in order to avoid overflow. This function returns accurate values of ln(Γ(x)) even for values of x which would cause Γ(x) to overflow.

See Also