[issue35431] The math module should provide a function for computing binomial coefficients

Mark Dickinson report at bugs.python.org
Fri Dec 7 08:08:26 EST 2018


Mark Dickinson <dickinsm at gmail.com> added the comment:

> Mathematically, `binomial(n, k)` for `k > n` is defined as 0.

It's not so clear cut. You can find different definitions out there. Knuth et. al., for example, in the book "Concrete Mathematics", extend the definition not just to negative k, but to negative n as well. Mathematicians aren't very good at agreeing on things. :-)

But that doesn't really matter: what we need to decide is what behaviour is useful for the users of the function.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35431>
_______________________________________


More information about the Python-bugs-list mailing list