[issue1640] Enhancements for mathmodule

Mark Dickinson report at bugs.python.org
Mon Jan 21 20:29:41 CET 2008


Mark Dickinson added the comment:

The problem with atanh is that it should be using absx throughout, rather than x.

So in "if (absx < 0.5)" branch and the following branch, replace all occurrences of x with 
absx, and it should work.

One other comment:  asinh shouldn't directly set errno for a NaN.  It should do the same as 
acosh and atanh:  return x+x. 

This makes asinh(float("nan")) return a nan, which makes it consistent with acosh and 
atanh, consistent with the way that Linux and OS X behave, and consistent with the other 
single-argument functions in math.

I think asinh should also return x+x for x an infinity.  This again should make it 
consistent with the way that the libm asinh works on OS X and Linux.

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


More information about the Python-bugs-list mailing list