From: Joseph Comfort (Joseph.Comfort@asu.edu)
Date: Sat Nov 04 2006 - 19:51:11 CET
Dear Chris,
Thank you for your helpful and insightful comments. You are certainly
correct about the IEEE754 standard, and the need to be careful about
compiler options. On my 64-bit Opteron machine, the C 'sizeof' command
gives 4 bytes for float, and 8 bytes for double, just as for a 32-bit
machine. These can be modified, however, by compiler options.
According to the information on the gcc (g77/gfortran) compiler, the
'-m64' option sets 'int' variables to 32 bits (8 bytes) and 'long'
variables to 64 bits (16 bytes). ((It doesn't say what happens to
doubles.) -m64 is normally the default in most Linux distributions on
64-bit machines, and -m32 is needed to restore the standard sizes. This
difference from 32-bit machines led to numerous problems in compiling
Geant3.
A couple of interesting web links on these issues are:
http://www.network-theory.co.uk/docs/gccintro/gccintro_70.html
http://developers.sun.com/sunstudio/articles/fp_errors.html
Best regards,
Joe
-- Joseph Comfort Phone: (480)-965-6377 Department of Physics & Astronomy Dept.: (480)-965-3561 Arizona State University Fax: (480)-965-7954 Tempe, AZ 85287-1504 Email: Joseph.Comfort@asu.edu
This archive was generated by hypermail 2.1.6 : Sun Nov 05 2006 - 17:19:55 CET