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!


Robert Dewar wrote:
In Fortran, this is an incorrect interpretation, the standard definitely
differentiates between (a+b)+c and a+b+c. So a Fortran compiler is allowed to reassociate the second expression (but it is a bad idea, and
it is desirable to have a mode in which this freedom is not taken
advangtage of).

From the latest Committee Draft of Fortran 2003, section 7.8.1.3:


- - - - - - - - - - - - - -

The rules given in 7.2.1 specify the interpretation of a numeric
intrinsic operation. Once the interpretation has been established in
accordance with those rules, the processor may evaluate any
mathematically equivalent expression, provided that the integrity of
parentheses is not violated.

- - - - - - - - - - - - - -

--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing



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