Name
specfun_factoriallog — The log-factorial function
Calling Sequence
flog = specfun_factoriallog ( n )
Parameters
- n :
a matrix of floating point integers, must be positive
- flog :
a matrix of floating point integers
Description
Returns the logarithm of the factorial of n.
This function overflows as soon as x>1.e306.
Examples
// Generates an error: this is not an integer
specfun_factoriallog(1.5)
// Generates an error: this is not positive
specfun_factoriallog(-1)
// Plot the function
scf();
plot(0:170,specfun_factoriallog)
Bibliography
"Introduction to discrete probabilities", Michael Baudin, 2010