[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trichotomy
- To: common-lisp at SU-AI
- Subject: trichotomy
- From: David A. Moon <MOON at SCRC-TENEX at MIT-MC>
- Date: Wed, 04 Aug 1982 23:39:00 -0000
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.
-------