Mark Dickinson added the comment:
Christian: I'm definitely not proposing atanh(1) = inf: it should raise
ValueError. I'm proposing that we follow Tim's rules for now; this means no
change for finite inputs.
The new thing here is that since you've made inf and nan more accessible and
consistent across platforms, I think we should make sure that the math
functions
do the right thing for an *input* of +/-inf or nan. I'm almost sure that the
current behavior of e.g. exp(float("inf")) is more-or-less accidental rather
than designed.
I think I'm missing the point of your math.atanh(.999...) example.
.99999999999999999 *is* already exactly equal to 1.0, so you're just proving
that math.atanh(1.0) currently gives a ValueError. (Which, again, I think is
the right thing to do.)
>>> x = .99999999999999999
>>> x == 1.0
True
The atanh0022 result is definitely a bug: it looks like either asinh or log1p
is buggy. I'll try to figure it out.
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1640>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com