AdvancedNoise.Math.factorial

# .AdvancedNoise.Math.factorial

The product of all integer <= the input

## 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

#### Interface

>     function factorial
>       extends Modelica.Icons.Function;
>       input Integer n(min = 0) "Positive integer";
>       output Integer f "Factorial of n";
>     end factorial;

## Revisions

| Developed 2014 at the DLR Institute of System Dynamics and Control

Generated at 2026-05-09T18:18:56Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos