Returns the derivative of the log gamma function, also called the digamma function.

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

Syntax

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

Parameters

x
Type: System..::.Double
A double value, the point at which the digamma function is to be evaluated.

Return Value

A double value specifying the logarithmic derivative of the gamma function of x. If x is a zero or a negative integer, the result is NaN. If x is too close to a negative integer the accuracy of the result will be less than half precision.

Remarks

The psi function is defined to be


            \psi(x)=\frac{d}{dx}\ln\Gamma(x)=\frac{\Gamma'(x)}{\Gamma(x)}
See Gamma for the definition of \Gamma(x)
            .

The argument x must not be exactly zero or a negative integer, or \psi(x) is undefined. Also, x must not be too close to a negative integer such that the accuracy of the result is less than half precision.

See Also