Computes the factorial of a value.
Syntax
Result = SRP_Math("FACTORIAL", Value, "", DecimalPlaces, ScientificNotation)
Returns
The factorial of Value.
Remarks
The FACTORIAL operation computes the factorial of Value. The factorial is the following algorithm:
N * (N - 1) * (N - 2) ... until N < 2.
Value must be an integer. No error is generated if Value is a decimal number, but the results will be nonsense.
You can specify FACT for short.
Example
// Compute the factorial of 16 Result = SRP_Math("FACTORIAL", "16") !! Result = 20922789888000.0 !!
// Computing the factorial of PI doesn't really make sense Val = "3.14159" Result = SRP_Math("FACT", Val) !! Result = 1.08749826743204552961 !!