Mark Dickinson <dicki...@gmail.com> added the comment:

>From the values in the report, float.fromhex is giving the correct value here, 
>but MIN-3*TINY is somehow coming out incorrectly.

Correct values (with Python 2.6, so old float repr; OS X 10.6.2):

Python 2.6.5+ (release26-maint:79559:79560, Apr  1 2010, 21:54:0) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> float.fromhex('0x0.ffffffffffffd6p-1022')
2.2250738585071999e-308
>>> MIN = float.fromhex('0x1p-1022')
>>> TINY = float.fromhex('0x0.0000000000001p-1022')
>>> MIN
2.2250738585072014e-308
>>> TINY
4.9406564584124654e-324
>>> 3*TINY
1.4821969375237396e-323
>>> MIN - 3*TINY
2.2250738585071999e-308
>>> from math import ldexp
>>> ldexp(1.0, -1074)
4.9406564584124654e-324

It would be helpful to see the corresponding ARM outputs.  I suspect a platform 
bug either in ldexp or in the multiplication or subtraction above.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8265>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to