num-integer icon indicating copy to clipboard operation
num-integer copied to clipboard

`binomial(n, k)` for `n < 0`

Open ronnodas opened this issue 1 year ago • 0 comments

This would be a breaking change either way, but binomial(n, k) with n < 0 should either produce (-1).pow(k) * binomial(k - n - 1, k) = n(n-1)...(n-k +1)/k! or n and k should be unsigned. See eg https://en.wikipedia.org/wiki/Binomial_coefficient#Generalization_and_connection_to_the_binomial_series.

ronnodas avatar Dec 09 '23 08:12 ronnodas