(j3.2006) IEEE comparisons
Cohen Malcolm
malcolm
Tue Aug 23 04:47:45 EDT 2016
Hi Robert,
I wrote:
> I am not adamantly opposed here; just that the costs seem to outweigh the
> likely benefits.
I will think further, but perhaps we should at least straw vote this (next
meeting I mean, not via email!).
<<<
On a slightly different topic, ISO/IEC/IEEE 60559:2011
forbids replacing the expression
.NOT. (X .LT. Y)
with
X .GE. Y
(see the last paragraph of Subclause 5.11).
Subclause 7.1.5.4.2 allows a logical expression to
be evaluated as any other expression that is
logically equivalent. I assume that that means
the optimization is allowed unless IEEE_SUPPORT_NAN
is true for X and Y. Do we need to say something
about that?
>>>
Well, if IEEE_SUPPORT_NAN is true for X and Y, and IEEE_ARITHMETIC (or some
IEEE_FEATURE thingy) is accessible, then .GE. is not the logical inverse of
.LT. (in pseudo-operator form, in this case the opposite of "<" is "?>=").
I don't think we need say anything in normative text, as this is clear from
reading c14 and 60559, but a note would probably not hurt since reading all
that is a bit of a chore. OTOH the optimiser writers ought to know this
stuff... and the ones who don't probably won't read the note anyway...
Cheers,
--
........................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list