binomial_coefficient: Calculates the binomial coefficient with several different...

Description Usage Arguments Value References Examples

Description

Calculates the binomial coefficient with several different algorithm methods available.

Usage

1
binomial_coefficient(n, k, method = "multiplicative")

Arguments

n

Number of possibilities

k

number of unordered outcomes

method

selects the algorithm to use for calculating the binomial coefficient. Options include the multiplicative (default), recursive, or factorial methods. Please note the recursive method can be very slow and is not recommended over other algorithms.

Value

The binomial coefficient

References

Binomial coefficient. (2017, April 17). In Wikipedia, The Free Encyclopedia. From https:#en.wikipedia.org/w/index.php?title=Binomial_coefficient&oldid=775905810 Binomial coefficients. Encyclopedia of Mathematics. From http:#www.encyclopediaofmath.org/index.php?title=Binomial_coefficients&oldid=39155 Weisstein, Eric W. "Binomial Coefficient." From MathWorld–A Wolfram Web Resource. http:#mathworld.wolfram.com/BinomialCoefficient.html

Examples

1
2
binomial_coefficient(5, 3)
binomial_coefficient(6, 4, 'factorial')

aschleg/numberr documentation built on May 14, 2019, 10:31 a.m.