From: Chris Theis (Christian.Theis@cern.ch)
Date: Sat Nov 04 2006 - 14:43:57 CET
Dear Joseph,
I certainly don't mean to get into a discussion about when/where/why
double precision is mandatory or about any arguments regarding quality.
But I rather want to comment on one myth that I'm sure will come up
again in the near future and is probably of interest to the simulation
community, whatever code they use. It's about precision and 64 bit
machines/compilations. I've developed my own CSG kernel and tracking
code so I had happily jumped onto the idea that 64-bit will help me to
get rid of numerical accuracy issues as it will give us better floating
point accuracy. However, when I saw the specs of the 64-bit machines I
learnt that this is a misconception, which is actually widely spread.
Practically the FPU of all modern processors complies with the IEEE754
standard which specifies the precision and also the 64-bit processors
adhere to this specification. Basically, this means that single
precision is represented with 32 bits and double precision with 64 bits.
However, also the 32-bit Intel/AMD processors already complied with this
standard, so there is no change at all with respect to the floating
point accuracy in 64-bit compilations. Still, the issue is more subtle
because in comparing the results of 32 & 64 bit programs one has to be
very very careful to restrict the compilers really to exactly identical
settings. The reason is that even with 32-bit machines there is
something which is called extended double precision, which basically
allows floating point calculations to take place using 80 bits.
Nevertheless, the results are truncated to 64 bits before being written
into memory. Even single precision calculations (32-bits) will be
promoted to 80 bits if this mode is activated, which is something that
most people outside the compiler development community are unaware of.
If this extended double precision mode is used or not depends on the
compiler and its settings and defaults. Therefore, one has to take
immense care to specify really the same compilation environment for 32
and 64 bit comparisons.
What 64 bit machines will give you is that you can address more memory
and that some programs _may_ run faster, but this discussion would lead
too far and would get very technical.
Best regards
Chris
------------------------------------------------------------------------
Chris Theis
CERN/SC-RP - European Organization for Nuclear Research
1211 Geneva 23, Switzerland
Phone: +41 22 767 8069 Office: 892-2A-015
e-mail: Christian.Theis@cern.ch www.cern.ch/theis
------------------------------------------------------------------------
This archive was generated by hypermail 2.1.6 : Sat Nov 04 2006 - 17:04:00 CET