Fact
Description
This function is used to calculate the factorial of a non-negative integer, denoted by:
For zero,
.
Please note that the largest n is 170. If n is bigger than 170, this function will return missing value. To calculate factorial for the larger integer, you can use the Log_gamma function, which approximates a factorial.
Syntax
double Fact(int n)
Parameters
n
- The integer number for calculating the factorial.
Return
Return the factorial of a non-negative integer n.
Example
fact(3) = ; // 6 fact(170) = ; // 7.257415615308E306 fact(171) = ; // n is too big, return missing value --
/math-c7419220d4ff922e693e572151711243.png)