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

*To*: navajo!Moon%STONY-BROOK.SCRC.Symbolics.COM@navajo.stanford.edu*Subject*: Numerical Comparison: "required coercions"*From*: edsel!bhopal!jonl@navajo.stanford.edu (Jon L White)*Date*: Thu, 26 Mar 87 11:10:18 PST*Cc*: navajo!Common-Lisp%sail@navajo.stanford.edu, navajo!Numerics%STONY-BROOK.SCRC.Symbolics.COM@navajo.stanford.edu, navajo!fateman%mike.Berkeley.EDU.navajo!gls%Think.COM@navajo.stanford.edu*In-reply-to*: David A. Moon's message of Thu, 26 Mar 87 00:59 EST

Having spoken with a number of Lisp users (as opposed to implementors), the overwhelming consensus appears to be that "=" must act like a transitive operation. I should think that this statement alone would be sufficient to clarify sections 12.1 to 12.4 of CLtL. Thus the phrase "required coercions" would have to take on a context-sensitive interpretation -- certain kinds of coercions are required when doing comparisons, others are required when doing operations like addition and multiplication. I don't propose to fix up the inherent non-associativity of floating-point addition and multiplication; this "feature" is a consequence of truncating information (i.e., "rounding" by whatever rule) in order to return a result in the required format. Note, however, that the comparison functions return a boolean value -- not a floating-point value -- and hence aren't subject to the same problems. So I would think that differing kinds of coercions between the two kinds of operations wouldn't violate reasonable expectations. You're quite right that if IEEE specifies what to do when comparing floats of differing precisions (e.g., single-float with double-float) then we ought to go for that. I don't know what it says. How about it Richard J. Fateman, you usually know about these matters? -- JonL --

- Prev by Date:
**Free variables in a LAMBDA which names a function** - Next by Date:
**Numerical Comparison: "required coercions"** - Previous by thread:
**Re: Numerical Comparison: "required coercions"** - Next by thread:
**Re: Numerical Comparison: "required coercions"** - Index(es):