Floating Point Problem ffast-math Complex divide Pentium3
FX Coudert
fxcoudert@gmail.com
Fri Oct 21 21:05:00 GMT 2005
> Option -ffpe-trap does not work on my Pentium3. Should it work on a
> Pentium3? The short program still prints out incorrect results.
It's not related to you chip, I guess -ffpe-trap and -ffast-math have
incorrect interactions. That should be expected, since the first asks
for a precise handling of IEEE exceptions, while the second says
something like "don't bother about IEEE, do what you want but do it quick!".
> The program I extracted the code from runs without an error being raised,
> but has completely different output. My 64 bit athlon64 outputs all Nans.
> My Pentium3 outputs numbers that are close to being correct. Strange ??
Not especially. Agressive optimization is only possible for some types
of numeric codes, with good stability. On others, it might (and does)
wreak havoc.
FX
More information about the Fortran
mailing list