That's a very good reminder.

Though, I should also add that it can be quite useful. For example,
when dealing with 3d meshes generated by someone else, sometimes
points which "look the same" are "not quite the same" in their
floating point representation.

(That said, I have also often wished that I could make 'local' changes
to 9!:odd settings. Usually it's enough to preserve the values and
then restore them later, but error handling and interrupts have tended
to mean that eventually I have to restart my J session to deal with
the resulting bit rot.)

Thanks,


--
Raul

On Sun, Apr 25, 2021 at 12:42 PM Roger Hui <[email protected]> wrote:
>
> A friendly reminder:  beware of tolerant comparison when dealing with the
> set functions.  In particular, the meme (i.@# = i.~) for computing the
> nubsieve and nub, in the APL folklore for decades, can give bad results for
> floating point arguments with tolerant comparison.
>
> If this idea is new to you, the following may be helpful:
> *- Index-Of on Multiple Floats
> <https://www.dyalog.com/uploads/conference/dyalog17/presentations/D07_IndexOf_on_Multiple_Floats.zip>*,
> Dyalog User Meeting, 2017
> *- Tolerant Unique
> <https://www.dyalog.com/uploads/conference/dyalog17/presentations/D10_Tolerant_Unique.zip>*,
> Dyalog User Meeting, 2017.
>
>
> On Sun, Apr 25, 2021 at 9:06 AM Henry Rich <[email protected]> wrote:
>
> > The i.-family is missing a member, I think. We have (x -. y) to find the
> > items of x not in y, but we don't have a way, supported by fast code, to
> > find the items of x that ARE in y.  I'd like to fill that in.  But what
> > is the best idiom, call it I?  I have two requirements, apart from valid
> > result:
> >
> > * the definition should allow for precomputing the search table via at
> > least one of m&I and I&n
> > * the definition should give reasonable and explainable results when x
> > and y have different rank
> >
> > In addition, it would be nice if
> >
> > * repeated items in one argument, preferably x, are repeated in the
> > result, for symmetry with (x -. y)
> >
> > I have used two idioms for intersection: ([ -. -.) and (e. # [) . (e. #
> > [) is ill-behaved on arguments of different rank.  So I am leaning toward
> >
> > ([ -. -.)
> >
> > for I .  Any other ideas?
> >
> > Henry Rich
> >
> >
> > --
> > This email has been checked for viruses by AVG.
> > https://www.avg.com
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to