Probabilities.psi Method

Double psi(Int32 derivate, Double x)

Returns the polygamma function psi^((m))(x) of order derivate.

#NameDescription
1derivateorder m of the polygamma function
2only 0 and 1 are supported.
3xargument
4real positive.

Returns: Double

Remarks:

Computes the m-th derivative of the logarithm of the Gamma function:

psi^((m))(x) = (d^(m+1))/(dx^(m+1))lnGamma(x) .

Defined behavior: if derivate is 0 the function returns psi(x) (see Dew.Math.Units.Probabilities.digamma); if derivate is 1 it returns psi^((1))(x) (see Dew.Math.Units.Probabilities.trigamma). Both return NAN for x <= 0. Any other value of derivate is not supported and raises an EMtxVecException.