Message97432
I did not find any report about this.
Windows 7, Python 2.6.4
>>> float('inf') == float('inf')
True
>>> float('-inf') == float('-inf')
True
>>> float('-inf') == float('inf')
False
>>> float('-inf') != float('inf')
True
>>> float('nan') == float('nan')
False
>>> float('nan') != float('nan')
True
>>>
I'm not an expert on that field, I wonder if the following is
not related to a sign bit missmatch, see also Python 3.1.1 below.
>>> copysign(1, float('inf'))
1.0
>>> copysign(1, float('-inf'))
-1.0
>>> copysign(1, float('nan'))
-1.0
>>> copysign(1, float('-nan'))
-1.0
>>>
Windows 7, Python 3.1.1
>>> float('inf') == float('inf')
True
>>> float('-inf') == float('-inf')
True
>>> float('-inf') == float('inf')
False
>>> float('-inf') != float('inf')
True
>>> float('nan') == float('nan')
False
>>> float('nan') != float('nan')
True
>>>
Same behaviour as with Python 2.6.4
>>> copysign(1, float('inf'))
1.0
>>> copysign(1, float('-inf'))
-1.0
>>> copysign(1, float('nan'))
-1.0
>>> copysign(1, float('-nan')) <<<<<<<<<<<<<<<<<<<
1.0
>>>
Different behaviour from Python 2.6.4 |
|
Date |
User |
Action |
Args |
2010-01-08 19:09:20 | jmfauth | set | recipients:
+ jmfauth |
2010-01-08 19:09:20 | jmfauth | set | messageid: <1262977760.25.0.00378314751244.issue7660@psf.upfronthosting.co.za> |
2010-01-08 19:09:18 | jmfauth | link | issue7660 messages |
2010-01-08 19:09:18 | jmfauth | create | |
|