id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
14897 binomial(x, m) gives incorrect answer when m is float ppurka AlexGhitza "Essentially, this stuff
{{{
sage: binomial(10, 0.1)
1
}}}
What I would have expected it to give as output is
{{{
sage: gamma(10+1)/gamma(10-0.1+1)/gamma(0.1+1)
1.32919082253922
}}}
This enhancement has to be done on the sage side since both mpir and pari don't give the correct answer. Using the gamma function in these special cases will also take care of complex numbers.
But, we must avoid changing the whole implementation to the gamma function - that was also giving incorrect results and was fixed in #12448. The `sage.rings.arith.binomial` function itself is a bit of a mess and it is hard to figure out what will eventually get executed in that code." enhancement new major sage-6.4 basic arithmetic binomial N/A