BINOMIALCOEF Function
Evaluates the binomial coefficient.
Usage
result = BINOMIALCOEF(n, m)
Input Parameters
n—First parameter of the binomial coefficient. Parameter n must be nonnegative.
m—Second parameter of the binomial coefficient. Parameter m must be nonnegative.
Returned Value
result—The binomial coefficient:
is returned.
Input Keywords
Double—If present and nonzero, double precision is used.
Discussion
The binomial function is defined to be:
with n ≥ m ≥ 0. Also, n must not be so large that the function overflows.
Example
In this example:
is computed and printed.
n = 9
m = 5
ans = BINOMIALCOEF(n, m)
PRINT, 'binomial coefficient =', ans
; PV-WAVE prints: binomial coefficient = 126.000