
binomial - Binomial coefficient

Calling sequence:

binomial(n, k)

Parameter:

n, k   --  expressions

Summary:

binomial(n, k) returns the binomial coefficient n over k. If both arguments
are positive integers with 0 <= k <= n, then
             binomial(n, k) = n!  / k!  / (n-k)!
The more general definition of the binomial coefficient is
    binomial(n, k) = gamma(n+1) / gamma(k+1) / gamma(n-k+1)
binomial returns the function call with evaluated arguments, if the first or
second argument cannot be evaluated to a number. Exceptions to this rule
are the binomial coefficients that can be simplified in a trivial manner.

>>  binomial(46, 23);

     8233430727600

>>  binomial(-235/123, 3);

     -20233265/5582601

>>  binomial(163.65674, I);

      1.224281883 - 1.483129672*I

>>  binomial(n, 0);

      1

See also:  fact, gamma

