This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients doko, flox, loewis, mark.dickinson
Date 2010-04-01.21:34:04
SpamBayes Score 2.7239573e-09
Marked as misclassified No
Message-id <1270157646.29.0.160288531157.issue8265@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-04-01 21:34:06mark.dickinsonsetrecipients: + mark.dickinson, loewis, doko, flox
2010-04-01 21:34:06mark.dickinsonsetmessageid: <1270157646.29.0.160288531157.issue8265@psf.upfronthosting.co.za>
2010-04-01 21:34:05mark.dickinsonlinkissue8265 messages
2010-04-01 21:34:04mark.dickinsoncreate