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 mark.dickinson
Date 2008-05-21.20:36:53
SpamBayes Score 0.0017930194
Marked as misclassified No
Message-id <>
On some older Intel 32-bit hardware, under Linux, floating-point 
operations don't always give correctly rounded results.  Here's an 
example involving addition, on SuSE Linux 10.2/Xeon.

Python 2.6a3+ (trunk:63521, May 21 2008, 15:40:39) 
[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 1e16 + 2.999
>>> 1e16 + 2.9999

The second result should really be 1e16+2., not 1e16+4.  This appears to 
be related to this GCC issue:

Various fixes are possible.  One possible fix is to add the -ffloat-
store flag to the gcc options.  Another is to use the information in 
fpu_control.h, if available, to set the precision control.  Yet another 
is to sprinkle some 'volatile' modifiers throughout floatobject.c.

It's not clear to me that this *should* be fixed, but I think the 
problem should at least be documented.  Hence this bug report.
Date User Action Args
2008-05-21 20:36:59mark.dickinsonsetspambayes_score: 0.00179302 -> 0.0017930194
recipients: + mark.dickinson
2008-05-21 20:36:57mark.dickinsonsetspambayes_score: 0.00179302 -> 0.00179302
messageid: <>
2008-05-21 20:36:56mark.dickinsonlinkissue2937 messages
2008-05-21 20:36:53mark.dickinsoncreate