STINNER Victor <[EMAIL PROTECTED]> added the comment:

Ok, I understand why different versions of the same code gives 
different results: compiler flags! Python 2.5.1 is my Ubuntu version 
(should be compiled with -O3) whereas Python 2.7 and 3.1a0 are 
compiled by me with -00.

Results with Python 2.5.1:
 - with -O0, float(295147905179352891391L) gives 
2.9514790517935283e+20
 - with -O1, float(295147905179352891391L) gives 
2.9514790517935289e+20

I'm unable to isolate the exact compiler flag which changes the 
result. I tried all options listed in the gcc doc for the -O1 option:
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html#Optimize-Options

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3166>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to