Floating point comparison

Ian Dall ian@beware.dropbear.id.au
Fri Dec 6 17:16:00 GMT 2002


Geoff Keating writes:
 > > From: Ian Dall <ian@beware.dropbear.id.au>
 > > Date: Fri, 6 Dec 2002 23:55:08 +1030
 > 
 > > Geoff Keating writes:
 > >  > it didn't switch between GE and LT.  Both branches are LT, it's just
 > >  > that one of them is reversed.  It is your port that is interpreting a
 > >  > reversed LT branch as GE, which it shouldn't be doing.
 > No.  The last three lines do not 'make the transformation anyway'.
 > They make a different transformation.  You need to go away and think
 > about how the transformations are different, and why the second
 > transformation is correct no matter what the situation.

I understood they are different, but not why the second is "always
correct", or more precisely, I didn't understand whether it was the
ports responsibility to ensure it was safe. I guess you have answered
that, thanks.

Can you enlighten me as to the semantics of unorders comparisons?
I can think of two possibilities:

  ULT means unordered or less than

  ULT means use operations which don't raise excpetions on unordered.

or I suppose both.

Ian



More information about the Gcc mailing list