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

*To*: will@cs.uoregon.edu*Subject*: Re: transitivity requirement on scheme comparison and rational?*From*: Hans_Boehm.PARC@xerox.com*Date*: Wed, 19 Feb 1992 10:27:05 PST*Cc*: Hans_Boehm.PARC@xerox.com, RRRS-Authors@mc.lcs.mit.edu*In-Reply-To*: "<9202180216.AA21244@skinner.cs.uoregon.edu>"

"It is possible to implement the Scheme number system using IEEE floating point numbers with (either symmetric or asymmetric) error bounds, and that would be a very useful thing to do. With symmetric error bounds, the difference between this and conventional interval arithmetic is a bit subtle. One difference is that Scheme's comparison predicates would use the locally best approximation, ignoring the error bounds. Another difference is that the midpoint of an interval is seldom the same as the locally best approximation, and the midpoint might not be an IEEE floating point number anyway. In short, an IEEE floating point number with error bounds is more expensive to compute than an interval, but it also gives more information, especially with asymmetric error bounds." Granted, this is possible. But it gives rise to another set of anomalies. For example, (real? (if (= x 4.0) (sqrt x) 2)) may evaluate to #f or generate an error if the interval for x includes negative values but the locally best approximation is 4.0. My impression is that if you don't interpret = as "overlaps", < as "definitely <", etc., then most code written without knowledge of interval arithmetic will break. What were the nasty examples that break if inexact comparisons are not forced to be transitive? Hans

**References**:**Re: transitivity requirement on scheme comparison and rational?***From:*William Clinger <will@cs.uoregon.edu>

- Prev by Date:
**Re: transitivity requirement on scheme comparison and rational?** - Next by Date:
**Re: transitivity requirement on scheme comparison and rational?** - Prev by thread:
**Re: transitivity requirement on scheme comparison and rational?** - Next by thread:
**Re: transitivity requirement on scheme comparison and rational?** - Index(es):