logfactorial

(function for equations)

 

Usage:

logfactorial (n)

Definition:

log (n (n – 1) (n – 2) ... 1)

Required:

n0      n is an integer

Returns the natural logarithm of the factorial of n (i.e. n!).

If n is not an integer you may want to use the loggamma function, which for integer values is related to logfactorial by: logfactorial (n) = loggamma (n + 1) but which is also defined for non-integer values.