XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Lngam()

Function Lngam ( X As  Double,
Optional Info As  Long 
)

Logarithm of gamma function ln(Γ(x))

Purpose
Computes the logarithm of the gamma function at x, where x is not 0, -1, -2, ...
Returns
Double
Logarithm of the gamma function ln(Gamma(x)).
Parameters
[in]XArgument x (X <> 0 and X <> negative integer)
(If X < 0, computes the real part = ln(|Γ(X)|))
[out]Info(Optional)
= 0: Successful exit.
= -1: The argument X had an illegal value. (X = 0 or negative integer)
= 1: Floating point range error.