[Bug target/17622] Non-optimal code sequence for floating point "x=0; x+=a*b;"
bangerth at ices dot utexas dot edu
gcc-bugzilla@gcc.gnu.org
Thu Sep 23 02:34:00 GMT 2004
------- Additional Comments From bangerth at ices dot utexas dot edu 2004-09-23 02:34 -------
Subject: Re: Non-optimal code sequence for floating point
"x=0; x+=a*b;"
> /* Maybe simplify x + 0 to x. The two expressions are equivalent
> when x is NaN, infinite, or finite and nonzero. They aren't
> when x is -0 and the rounding mode is not towards -infinity,
> since (-0) + 0 is then 0. */
Another reason for me to use -ffast-math. Programs that rely on such
semantics are just doing something intensely insane.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ices.utexas.edu
www: http://www.ices.utexas.edu/~bangerth/
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17622
More information about the Gcc-bugs
mailing list