[New-bugs-announce] [issue1725] -1e-1000 converted incorrectly
Guido van Rossum
report at bugs.python.org
Thu Jan 3 01:04:55 CET 2008
New submission from Guido van Rossum:
Since 1e-1000 == 0.0 (on an IEEE-754 platform anyway), I would expect
-1e-1000 to be -0.0. But it does not appear that way:
>>> 1e-1000
0.0
>>> -0.0
-0.0
>>> -1e-1000
0.0
However (correctly):
>>> (-1.0) * 1e-1000
-0.0
>>> -(1e-1000)
-0.0
I suspect the optimization for -x where x is a float literal is
incorrectly triggering here.
----------
messages: 59113
nosy: gvanrossum
severity: normal
status: open
title: -1e-1000 converted incorrectly
versions: Python 2.5, Python 2.6, Python 3.0
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1725>
__________________________________
More information about the New-bugs-announce
mailing list