>  Docs Center  >  IDL Reference  >  Advanced Math and Stats  >  IMSL_BINOMIALCOEF

IMSL_BINOMIALCOEF

IMSL_BINOMIALCOEF

The IMSL_BINOMIALCOEF function evaluates the binomial coefficient.

This routine requires an IDL Advanced Math and Stats license. For more information, contact your sales or technical support representative.

The binomial function is defined to be:

with nm ≥ 0. Also, n must not be so large that the function overflows.

Examples


In this example:

is computed and printed.

n = 9
m = 5
ans = IMSL_BINOMIALCOEF(n, m)
PRINT, 'binomial coefficient =', ans
 
binomial coefficient = 126.000

Syntax


Result = IMSL_BINOMIALCOEF(N, M [, /DOUBLE])

Return Value


The binomial coefficient:

is returned.

Arguments


M

Second parameter of the binomial coefficient. Argument M must be nonnegative.

N

First parameter of the binomial coefficient. Argument N must be nonnegative.

Keywords


DOUBLE (optional)

If present and nonzero, double precision is used.

Version History


6.4

Introduced

See Also


IMSL_BINOMIALCDF, IMSL_BINOMIALPDF



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us