Factorial (Function)
Calculates the factorial of a number, Num, by multiplying all positive integers less than or equal to Num.
Syntax
Factorial(Num)
Parameters
Name |
Type |
Description |
Num |
Numeric |
The base number from which to calculate the factorial. |
Returns (Double)
The Factorial of the specified number. Returns an error value of -1 if Num is a negative number.
Usage
The factorial of a number is equal to 1*2*3*...* number. The number needs to be positive, and if it has a decimal value it will be truncated.
Example
In the following expression, Value1 will be equal to 24 (1*2*3*4=24):
Value1 = Factorial(4);