[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-02 Thread David Radcliffe
David Radcliffe added the comment: I understand that pure mathematics is not the primary use case. But I would expect that math.comb() would be used to implement mathematical formulas. As a simple example, the number of edges in a complete graph on n vertices is binomial(n, 2), and this should

[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread David Radcliffe
David Radcliffe added the comment: I think that binomial(n, k) should return 0 when k > n or k < 0. This is a practical consideration. I'm concerned about evaluating sums involving binomial coefficients. Mathematicians are often rather loose about specifying the upper and lowe