[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a question about formatOf operations



On Thu, 06 Mar 2008 09:54:17 +0900, David Hough 754R work <754r@xxxxxxxxxxx> 
wrote:
In my view, the principal issue is that clause 10 (expression evaluation)
recommends that:

1) languages define the "literal meaning" of arithmetic statements by
translating them into 754R operations

That is completely unacceptable.

In general, programming language vendors don't want that.
Most users don't want that either.

Programming language standards have mostly ignored LIA which was
far less intrusive than this (but still too intrusive for many).

...
As an example,
according to these principles, Fortran should define the semantics of
      w = x + y + z
whether from left to right or right to left, and if the types differ,
where widening of operands occurs.

That is completely unacceptable.  Fortran is not going to do that.

But Fortran should also define
portable directive/attributes with meanings like "allow all value-changing
optimizations"  or "allow re-association of unparenthesized expressions"
or "allow re-association of parenthesized expressions that are mathmetically
reassociable", and implementations should respond to those directives
by optimizing the computation.

Not one proposal in this direction (and there have been several) have
been even close to achieving lack of consensus against them, let alone
achieving consensus in favour of them.

   Then the "reproducible mode" of
Fortran would just be the unoptimized "literal meaning" one.

The literal meaning is the meaning, end of story.

In 754R, "language defined" has a
special implied meaning that, though not preferable, languages could
choose to define certain behaviors by letting implementations define them.
Hasn't this has been the traditional posture of Fortran with respect to
expression evaluation?

No, I don't think that is a good approximation.

Fortran doesn't standardise computer arithmetic and its properties at all.
As far as Fortran is concerned, it is outwith the scope of the standard.
It is not defined by the language or by the processor: it is not defined
at all.

Cheers,
-- 
................Malcolm Cohen (malcolm@xxxxxxxxxxx)


754 | revision | FAQ | references | list archive