Feedback in_xrealcomp means that two reals are close together 

Forum: Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re: News Project Step #2, deadline Wednesday 13 November (Mike O'Donnell)
Re: Question Comporder question (Benedict Singer)
Date: 2002, Nov 12
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

I'm not sure how to interpret the phrase, "the width of the interval of their difference."

in_xrealcomp indicates that two reals are so close together that we've failed to distinguish them at a certain precision. "|xr1 - xr2| < prec" is a straightforward formula referring to two real numbers and a rational number. We don't happen to know the exact values of the two real numbers, but the formula still refers to the exact theoretical values.

To discover that |xr1 - xr2| < prec, and justify returning in_xrealcomp,you must approximate each of xr1 and xr2 with an interval, and the difference between the smallest left endpoint and the largest right endpoint must be smaller than prec. Typically, the intervals overlap, so this is the width of their union. If the intervals don't overlap, then you may return lt_xrealcomp or gt_xrealcomp, and you normally prefer those values as more usefully informative. But you are allowed to return in_xrealcomp whenever you have proved by the approximation intervals that |xr1 - xr2| < prec, and there might be reasons in some implementations of xreal to retrun this value.

The proven upper bound on the distance between xr1 and xr2 is not the width of an interval approximating their difference. Rather, it is the maximum absolute value of numbers in that interval, which of course is the maximum absolute value of the two endpoints.




Mike O'D.


to: "in_xrealcomp means that two reals are close together"