32bit vs. 64bit

Michael D. Godfrey godfrey at isl.stanford.edu
Sat Mar 14 02:40:13 CDT 2009


This is really a question:

I have some 64bit x86 architecture machines and one
32bit.  Compiling the same Octave 3.1.54+ on 64bit
and 32bit results in Octaves that differ by a small amount
when computing very small differences.  The difference
is surely within rounding error. 

The question is: is anyone surprised that the identical inputs
on 32 and 64 bit produce differing results?  Or, more interesting,
does anyone know why this happens?  All identical arithmetic
operations on floating point numbers should produce identical
results on the two architectures.

To give an idea of the difference, the residual difference between
two vectors which formally should be the same (zero) is:

64 bit:   -8.21e-14
32bit:    -1.58e-13

So, if anyone thinks that the results on 32bit and 64bit should match
exactly, I will try to figure out where the difference occurs.  (There is
lots of computing down the paths: use of elementary functions
e, sin, cos, log, ... and a lot of other transforms.)  Also, the 32bit
and 64bit gcc and gfortran may not generate excatly the same code.

Michael



More information about the Bug-octave mailing list