[issue22548] Bogus parsing of negative zeros in complex literals
Mark Dickinson
report at bugs.python.org
Fri Oct 3 19:50:31 CEST 2014
Mark Dickinson added the comment:
> Oops, I get it now.
Okay. :-)
Just for the record, for anyone encountering this issue in the future, here's the relevant extract from section 6.3 of IEEE 754-2008:
"""
When the sum of two operands with opposite signs (or the difference of two operands with like signs) is exactly zero, the sign of that sum (or difference) shall be +0 in all rounding-direction attributes except roundTowardNegative; under that attribute, the sign of an exact zero sum (or difference) shall be −0. However, x + x = x − (−x) retains the same sign as x even when x is zero.
"""
It doesn't cover the "sum with like signs" or "difference with opposite signs" cases, I suppose because it should be obvious what happens in those cases.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22548>
_______________________________________
More information about the Python-bugs-list
mailing list