Returns the logarithm of the Gamma function of the absolute value of a double.

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
public static double LogGamma(
	double x
)
Visual Basic (Declaration)
Public Shared Function LogGamma ( _
	x As Double _
) As Double
Visual C++
public:
static double LogGamma(
	double x
)

Parameters

x
Type: System..::.Double
A double value.

Return Value

A double value specifying the natural logarithm of the Gamma function of |x|. If x is a negative integer, the result is NaN.

Remarks

Method LogGamma computes {\rm ln} \left| {\Gamma (x)} 
            \right|. See Gamma for the definition of \Gamma(x).

The Gamma function is not defined for integers less than or equal to zero. Also, \left| x \right| must not be so large that the result overflows. Neither should x be so close to a negative integer that the accuracy is worse than half precision.

Plot of LogGamma(x)

See Also