math.erfc OverflowError

geremy condra debatem1 at gmail.com
Sat Jun 12 18:49:37 EDT 2010


In Python3.2, calling math.erfc with a value in [-27.2, -30) raises
an OverflowError: math range error. This is inconsistent with the
erfc function from scipy (scipy.special.erfc) as well as with the C99
function by the same name, both of which return 2. I suspect that
this is the result of the cutoff for the use of the continuing fraction
approximation of erfc beginning when abs(x) > 30, but I'm not sure.
Is this desired behavior or should I file a bug report?

Geremy Condra



More information about the Python-list mailing list