[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Numerical Comparison: "required coercions"
- To: Moon@stony-brook.scrc.symbolics.com, Common-Lisp@sail.stanford.edu
- Subject: Numerical Comparison: "required coercions"
- From: Guy Steele <gls@Think.COM>
- Date: Thu, 26 Mar 87 10:29 EST
- Cc: Numerics@stony-brook.scrc.symbolics.com, firstname.lastname@example.org
- In-reply-to: <870326005921.4.MOON@EUPHRATES.SCRC.Symbolics.COM>
This issue makes me want to restate an earlier proposed model
for the comparison functions:
(? x1 x2 x3 x4 ... xn-1 xn) <=>
(AND (? x1 x2) (? x1 x3) (? x1 x4) ... (? x1 xn-1) (? x1 xn)
(? x2 x3) (? x2 x4) ... (? x2 xn-1) (? x2 xn)
(? x3 x4) ... (? x3 xn-1) (? x3 xn)
(? xn-1 xn))
where "?" may be =, /=, <, >, <=, or >=.
That is, in principle every pair of arguments is compared.
This is the model that justifies the "all different" interpretation for /=,
and it is recognized that in practice the other five operations may
be implemented cleverly through exploitation of transitivity. Well,
maybe such reliance on transitivity is wrong.