[issue1640] Enhancements for mathmodule

Mark Dickinson report at bugs.python.org
Tue Jan 22 03:10:30 CET 2008


Mark Dickinson added the comment:

Hmmm.

For atanh(1):  raising OverflowError is actually consistent with what currently happens.  
The only singularity that's already present in math is log(0), and it seems that that 
raises OverflowError on OS X, Linux and Windows...  I wonder whether this is what Tim 
meant to say?

For acosh(0):  you're right, and I'm wrong---this should definitely return a NaN and set 
errno.  I guess that dividing 0 by 0 doesn't set errno on Windows.  Okay: let's set it 
directly there.

I do still think that asinh(nan), atanh(nan) and acosh(nan) should return nan and not 
raise any exceptions, just for the sake of consistency with Linux/OS X and with the other 
libm functions.

I guess I don't really care about asinh(+/-inf), etc:  an infinite return value will be 
caught by the stuff in math_1 anyway.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1640>
__________________________________


More information about the Python-bugs-list mailing list