Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Conflicts between C standard and 754-2008



On 2011-01-13 09:36:37 +0000, N.M. Maclaren wrote:
> On Jan 13 2011, Vincent Lefevre wrote:
> >>>No, you're also using the associativity here, because a+b+c is
> >>>interpreted unambiguously as (a+b)+c. And from (a+b)+c to (a+c)+b,
> >>>you're not using the commutativity only, but a succession of
> >>>commutativity and associativity transformations.
> >>
> >>No, that is NOT true, and never has been!  Please stop propagating that
> >>myth.  The word that is false (and I mean false) is "unambiguously", and
> >>without that it is still misleading.  All that is unambiguous is the
> >>PARSING - the evaluation has NEVER been clearly specified.
> >
> >The evaluation is just a consequence of the parsing. If you follow the
> >grammar (which specifies expressions), a+b+c is equivalent to (a+b)+c,
> >and the C standard has no rules concerning explicit parentheses.
> 
> And that is PRECISELY what is a myth.  As I said, there is nothing in
> the standard that states the evaluation must mirror the parsing, and
> some wording that indicates that it need not.

I'm not talking about the evaluation, but about the expression
definition. The parsing defines the expression in term of operations.
The evaluation of an expression is another matter.

It seems that every one except you understands what the C standard
means on this point...

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)