BUG: special: implement asymptotic expansion in beta(a, b) for a >> |b| #370

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Owner

pv commented Dec 1, 2012

The beta function encountered total loss of precision for a >> max(|b|, 1), as gammaln(a+b) - gammaln(a) == 0 in floating point arithmetic in that case.

This PR implements an asymptotic expansion fixing that. Tests against mpmath included.

Member

ewmoore commented Dec 7, 2012

For what it's worth, this looks good to me. I haven't tested it, but the expansion is correct.

Owner

rgommers commented Dec 8, 2012

Thanks @pv, @ewmoore. Tested with 2.7 and 3.2, merged as 536056e.

rgommers closed this Dec 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment