| SpecialFunctionsBinomial Method |
Binomial coefficient (n choose k); The number of ways of
picking k unordered outcomes from n possibilities.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public static double Binomial(
int n,
int k
)
Public Shared Function Binomial (
n As Integer,
k As Integer
) As Double
public:
static double Binomial(
int n,
int k
)
static member Binomial :
n : int *
k : int -> float
Parameters
- n Int32
- The total number of possibilities.
- k Int32
- The number of desired outcomes, less than or equal to n.
Return Value
DoubleThe binomial coefficient, or 0 if k or n < 0, or k > n.
Remarks
The binomial coefficient
nCk (n choose k) is defined by:
nCk = n! / ( k! ( n-k )! )
Zero is return if k or n < 0, or k > n.
See Also