This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC beaten by ICC in stupid trig test!


>   IIUIC the fact that the + operator is specified in the standard as
> binding left-to-right imply that "a + b + c" with no brackets *has* to be
> interpreted as "(a + b) + c".

Specific examples of allowable transformations (taken directly from the f95 
standard):

original written form-> allowable form
x+y -> y+x
-x+y -> y-x
x+y+z -> (x+y)+z
a+b-c -> a+(b-c)
x+y+z -> x+(y+z)
x*y+x*z -> x*(y+z)
a/b/c -> a/(b*c)
a/5.0 -> 0.2*a

However, the following transformation is not allowed:
a+(b-c)->(a+b)-c

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]