Message61385
Mark Dickinson wrote:
> So e.g. cos(infinity) should give a ValueError, while log(infinity) and exp(infinity)
> should not raise any Python exception, but should return an infinity instead. And most
> single variable operations should return an input NaN unaltered, without raising an
> exception.
The matter should be discussed in a proper PEP and targeted for Python
3.0. Python 3.0 is the right place for subtle changes which may break
code. For Python 2.6 we must not change the exception or outcome of a
function and new functions should be as consistent with existing ones as
possible.
I still don't like the idea of math.atanh(1) == inf. Why? See for yourself:
18.714973875118524
>>> math.atanh(.99999999999999999)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: math domain error
(Linux)
Christian |
|
Date |
User |
Action |
Args |
2008-01-21 12:24:51 | christian.heimes | set | spambayes_score: 0.00211136 -> 0.00211136 recipients:
+ christian.heimes, gvanrossum, tim.peters, mark.dickinson, Rhamphoryncus, gmcastil |
2008-01-21 12:24:50 | christian.heimes | link | issue1640 messages |
2008-01-21 12:24:49 | christian.heimes | create | |
|