scipy/scipy — pull request #370 by pv (2012-12-01 21:07:16+00:00)
Title: BUG: special: implement asymptotic expansion in beta(a, b) for a >> |b|

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.