AdvancedNoise.Math.binomial

# .AdvancedNoise.Math.binomial

Binomial coefficient

## Information

#### Syntax

>     b = Math.binomial(n, k);

#### Description

This function returns positive integer being a coefficient in the binominal theorem, i.e. it is the coefficient of the xk term of the binomial power (1 + x)n, see also Wikipedia. The coefficient is given by

>             n!
>     b = -----------
>         k! (n - k)!

#### Example

>     binomial(3, 0);
>     // = 1.0
>     binomial(4, 2);
>     // = 6.0

#### Interface

>     function binomial
>       extends Modelica.Icons.Function;
>       input Integer n(min = 0) "Binominal power (positive integer)";
>       input Integer k(min = 0) "Positive integer for coefficient";
>       output Real b;
>     end binomial;

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