You may wish to keep in mind a danger of using an additive tolerance like
this as opposed to a multiplicative one: you might flag the difference
between "one hundred trillion" and "one plus one hundred trillion" as
significant (which it probably is not) while possibly missing the difference
between "two one-millionths" and "one one-millionth" (which may be
significant).

On Mon, Dec 27, 2010 at 11:04 AM, David Ward Lambert <b49p23t...@stny.rr.com
> wrote:

> Oops, I omitted f.   How to write it tacitly?  Although from the recent
> messages I ought to solve this myself.
>
>   match_in_range =: f =: 1 : (':'; 'u >: | x-y')
>
> On Mon, 2010-12-27 at 22:20 +0800, programming-requ...@jsoftware.com
> wrote:
> > Message: 4
> > Date: Sun, 26 Dec 2010 23:55:26 -0500
> > From: David Ward Lambert <b49p23t...@stny.rr.com>
> > Subject: Re: [Jprogramming] Matches within a range
> > To: programming@jsoftware.com
> > Message-ID: <1293425726.1897.14.ca...@lambertdw>
> > Content-Type: text/plain; charset="UTF-8"
> >
> >    list =: 133 139 153 159 165
> >    tolerance =: 7
> >    center =: 153
> >    list tolerance f center
> > 0 0 1 1 0
> >
> >    list tolerance(<:&)@|@-center
> > 0 0 1 1 0
> >
> >
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to