Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels