math.erfc OverflowError

Robert Kern robert.kern at gmail.com
Sat Jun 12 19:40:04 EDT 2010


On 2010-06-12 17:49 , geremy condra wrote:
> 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?

Bug, I think.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list