This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/17622] Non-optimal code sequence for floating point "x=0; x+=a*b;"
- From: "bangerth at ices dot utexas dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Sep 2004 02:34:15 -0000
- Subject: [Bug target/17622] Non-optimal code sequence for floating point "x=0; x+=a*b;"
- References: <20040922213444.17622.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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