Re: Floating point results change with different compilation options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Cristea,

> Is this a bug of the compiler...?

No.  Certain optimizations can exacerbate code that poorly accommodates
float peculiarities.

> ...or the floating point representation differs from one compiler version to
the other?

No, not the representation.  Probably the calculation.

The problem is one-or-both of:
+ not all hardware is compliant with IEEE 754 calculations
+ not all code is written carefully to accommodate float peculiarities

Please read the article What Every Computer Scientist Should Know About
Floating-Point Arithmetic, by David Goldberg (1991).

http://docs.sun.com/source/806-3568/ncg_goldberg.html

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux