egcs compatibility with IEEE floating point standard

egcs compatibility with IEEE floating point standard

Post by Geng Wan » Sat, 15 May 1999 04:00:00



Hi, guys,

I am using egcs-2.91.66 and found exp(-1.0/0.) gives "nan" if any
optimization is turned on. With no optimization, it gives 0.0000. On an IBM
RISC/6000 I have with gcc2.8.1, there is no problem with any level of
optimization. Could anybody tell me how I can let the compiler conform to
IEEE floating point standard but still have other optimizations done?

Where is the best place to find references for this kind of problems?

I am new here. Thanks in advance.

Geng

 
 
 

egcs compatibility with IEEE floating point standard

Post by Andrew Chu » Sat, 15 May 1999 04:00:00



>I am using egcs-2.91.66 and found exp(-1.0/0.) gives "nan" if any
>optimization is turned on. With no optimization, it gives 0.0000. On an IBM
>RISC/6000 I have with gcc2.8.1, there is no problem with any level of
>optimization. Could anybody tell me how I can let the compiler conform to
>IEEE floating point standard but still have other optimizations done?

I believe -mieee-fp is what you're looking for...

Quote:>Where is the best place to find references for this kind of problems?

Try the docs that come with egcs

--

See http://anderoo.dhs.org/~anderoo/pgp.html for PGP key

It's a sin only if you dwell on the what ifs and the but ifs