XLPack 6.1
Excel VBA Numerical Library Reference Manual
Loading...
Searching...
No Matches

◆ Polygamma()

Function Polygamma ( X As  Double,
N As  Long,
Optional Info As  Long 
)

Polygamma function ψn(x)

Purpose
This routine computes the polygamma function ψn(x), where x is not 0, -1, -2, ...
ψn(x) = dnψ(x)/dxn = d(n+1)/dx(n+1) ln(Γ(x))
Returns
Double
Polygamma function ψn(x).
Parameters
[in]XArgument x. (X <> 0 and X <> a negative integer)
[in]NArgument n. (N >= 0)
[out]Info(Optional)
= 0: Successful exit.
= -1: The argument X had an illegal value. (X = 0 or a negative integer)
= -2: The argument N had an illegal value. (N < 0)
= 1: Floating point range error.
Reference
boost/math/special_functions