This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Floating point comparison
> From: Ian Dall <ian@beware.dropbear.id.au>
> Date: Sat, 7 Dec 2002 11:45:10 +1030
> Cc: ian@beware.dropbear.id.au, rth@redhat.com, gcc@gcc.gnu.org
> 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.
I believe both. In C, '<' (which is LT in RTL) is an ordered
comparison (so traps on NaN), but isless() is unordered and gets
turned into 'UNGE'.
... but at least some ports (like rs6000) just don't bother. GCC
doesn't really have the support needed to make this efficient (like
#pragma STDC FENV_ACCESS).
--
- Geoffrey Keating <geoffk@geoffk.org>