http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59961

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Olaf from comment #3)
> Well... naive me found it quite surprising and unexpected that the following
> two lines produce grossly different results:
> 
> double result1 = -s1*d1 + s2*d2;
> double result2 =  s2*d2 - s1*d1;

-s1*d1 + s2*d2; is the same as (-s1)*d1 + s2*d2 that is the unary minus binds
to the left and has a higher precedence than the plus operator.

Reply via email to