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!


On Wed, Mar 24, 2004 at 02:10:13PM -0500, Paul Koning wrote:
>  Joe> Consider a, b, and c as single precision floating point values,
>  Joe> and a=1, b=-1, c=1.2345e-8.  (a+b)+c will compute as 1.2345e-8.
>  Joe> a+(b+c) will return zero, as will (a+c)+b. 
> 
> I don't have a C standard, but my copy of Harbison & Steele says what
> I expected about parentheses: "Parentheses do not necessarily force a
> particular evaluation order".  

This was true of K&R C, but I seem to recall that the standards committee
changed that.  Any standards gurus out there care to comment?


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