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

trichotomy



To clarify Fateman's remark, trichotomy does hold in the IEEE standard
for "normal" numbers.  No 2 of <,=,> can be true at the same time,
however it is possible for none of them to be true if the arguments
ar "unordered", i.e. one of the arguments is a not-a-number, or an
infinity in projective mode (where plus and minus infinity are the
same).   The IEEE standard further specifies that when the result
of a comparison is unordered, an Invalid Operand exception occurs.

Thus trichotomy only breaks down when the user disables trapping for
Invalid Operand exceptions.  Nevertheless, this seems worth a note
in the Common Lisp manual.

The answer when an unordered comparison is performed and the trap
is suppressed is that <,>,<=,>=, and = are all false.  It doesn't
say anything about /=, probably it's suppose to be true.  There is
also supposed to be an unorderedp predicate which returns true
when the arguments are unordered and does not cause an Invalid
Operand exception.
-------