Another method is to consider what happens at extrema (edge cases). x equals y with tolerance t if (|x-y) <: t * (|x)>.|y where <: is the exact comparison. When you are talking about magnitudes, the extrema are at 0 and _ (infinity).
Magnitude 0 has already been talked about. What about magnitude _ ? The definition leads to the consequence that EVERYTHING is tolerantly equal to _ when t is nonzero. The J implementation has been "aware" of this fact for many years (since the beginning?), and uses something else when one of the numbers is _ . I guess the dictionary should have a note re _ and tolerant comparisons. I leave as exercises for the reader contemplation of the following edge cases: y=: x y=: -x ----- Original Message ----- From: "Roger Hui" <[EMAIL PROTECTED]> To: "Programming forum" <[email protected]> Sent: Tuesday, May 30, 2006 6:56 AM Subject: Re: [Jprogramming] Equal tolerance fit conjunction -- again I provided a formal proof because I want to leave no doubt as to the conclusion. The same answer could have been arrived at using various other methods. ... ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
