Logarithm of the factorial. Equivalent to R's lfactorial(). Takes a single number:
lgamma(x + 1), computed without forming x + 1 near 0 so that small x keep their accuracy.
Parameters
x: number
Argument.
Returns number
log|x!| = log|Gamma(x + 1)| (Infinity at negative integers).
Logarithm of the factorial. Equivalent to R's
lfactorial(). Takes a single number:lgamma(x + 1), computed without formingx + 1near 0 so that smallxkeep their accuracy.