Stan Math Library
5.0.0
Automatic Differentiation
|
|
inline |
Return the binomial coefficient for the specified integer arguments.
The binomial coefficient, \({n \choose k}\), read "n choose k", is defined for \(0 \leq k \leq n\) (otherwise return 0) by
\({n \choose k} = \frac{n!}{k! (n-k)!}\).
n | total number of objects |
k | number of objects chosen |
std::domain_error | if either argument is negative or the result will not fit in an int type |
Definition at line 29 of file choose.hpp.