functionfactorial
The product of all integer <= the input
Extends from Modelica.Icons.Function (Icon for functions).
Information
Syntax
f = Math.factorial(n);
Description
This function returns product of all positive integers less
then or equal to input n.
Example
factorial(5); // = 120 factorial(0); // = 1
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | Positive integer |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | f | Factorial of n |
Revisions
|
Developed 2014 at the DLR Institute of System Dynamics and Control |