• Tim Peters's avatar
    Stop raising OverflowError on underflows reported by libm (errno==ERANGE and · 1d120619
    Tim Peters yazdı
    libm result is 0).  Cautiously add a few libm exception test cases:
    1. That exp(-huge) returns 0 without exception.
    2. That exp(+huge) triggers OverflowError.
    3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked
       with -lieee, it was raising OverflowError due to an accident of the way
       mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc).
    1d120619
test_math.py 5.39 KB