Author haypo
Recipients belopolsky, drj, haypo, mark.dickinson
Date 2008-12-09.15:38:01
SpamBayes Score 4.2574e-05
Marked as misclassified No
Message-id <1228837082.27.0.262143506628.issue3166@psf.upfronthosting.co.za>
In-reply-to
Content
About -O0 vs -O1, I think that I understood (by reading the 
assembler).

pseudocode of the -O0 version:
  while (....)
  {
     load x from the stack
     x = x * ... + ...
     write x to the stack
  }

pseudocode of the -O1 version:
  while (....)
  {
     x = x * ... + ...
  }

Intel uses 80 bits float in internals, but load/store uses 64 bits 
float. Load/store looses least significant bits.

Hey, floating point numbers are funny :-)

---

Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:40)
>>> 1e16 + 2.999
10000000000000002.0
>>> 1e16 + 2.9999
10000000000000004.0

Same result with python 2.7/3.1.
History
Date User Action Args
2008-12-09 15:38:02hayposetrecipients: + haypo, mark.dickinson, belopolsky, drj
2008-12-09 15:38:02hayposetmessageid: <1228837082.27.0.262143506628.issue3166@psf.upfronthosting.co.za>
2008-12-09 15:38:01haypolinkissue3166 messages
2008-12-09 15:38:01haypocreate