double Binomial(int N, int K);
Binomial coefficient C(n,k).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | N | int | n in nCk; integer. |
| 2 | K | int | k in nCk; integer. |
Returns: the binomial coefficient nCk.
Remarks:
Binomial coefficient nCk is the number of ways of picking k unordered outcomes from n possibilities, also known as a combination or combinatorial number. It is defined by:
binomnk = n!/(k! (n-k)!) .
Domain: N, K integer. Defined behavior: returns 0 when K < 0; returns 1 when K = 0 or K = N; returns N when K = 1 or K = N-1; otherwise the value is computed by the multiplicative product and rounded to the nearest integer. The result is returned as a double (it can exceed the 64-bit integer range for large N).
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler