Note that for comparison against exactly zero, monad * uses the comparison tolerance, but as an absolute tolerance rather than a relative one.
Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Devon McCormick > Sent: Friday, December 01, 2006 12:41 PM > To: General forum > Subject: Re: [Jgeneral] Bug? Sin of pi. > > Isn't there always a problem with tolerant comparisons to zero > since tolerance is defined in terms of some small proportion of > the number being compared? According to the Primer > (system/extras/help/primer/tolerance.htm) > "close enough is *relative *to the size of the numbers". > > In the case of comparing to zero, > you may need to resort to the standard old trick of comparing the > absolute value of the number you expect to be zero to some > small number, maybe the comparison tolerance itself: > > (9!:18'')>|1 o. 1p1 > 1 > (9!:18'')>|1 o. (1p1)+1e_13 > 0 > (9!:18'')>|1 o. (1p1)+1e_14 > 1 > 9!:18 '' > 5.6843419e_14 > > > On 12/1/06, Dan Bron <[EMAIL PROTECTED]> wrote: > > > > DB> 0 = 1 o. 1p1 > > DB> 0 > > > > RH> These are not bugs. > > > > Why not? > > > > -Dan > > > > > ---------------------------------------------------------------------- > > For information about J forums see > http://www.jsoftware.com/forums.htm > > > > > > -- > Devon McCormick > ^me^ at acm. > org is my > preferred e-mail > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
