Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!cs.utexas.edu!wupost!uwm.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!sp27.csrd.uiuc.edu!jaxon
From: jaxon@sp27.csrd.uiuc.edu (Greg P. Jaxon)
Subject: Re: APL2 question
Message-ID: <1992Mar18.101930.3466@csrd.uiuc.edu>
Sender: news@csrd.uiuc.edu
Organization: UIUC Center for Supercomputing Research and Development
References: <9203152248.AA24898@bottom.magnus.acs.ohio-state.edu> <728@kepler1.rentec.com>
Date: Wed, 18 Mar 92 10:19:30 GMT
Lines: 40

andrew@rentec.com (Andrew Mullhaupt) writes:

>	V <- (1 2 3 7) (2 4 5 6 1) (7 1 2)

>Now you just apply the magic formula:

>	without reduce negative 1 drop 2 ravel reduce V

You mean    ~/ ^1 drop 2/V   and you're right that some builtin function
to intersect would be much better for readability and performance than
A~A~B.  Many APLs have had such a function, and I think the reason it
keeps falling by the wayside is because it's so hard to define if you
use tolerant equality (which is not a transitive relation).

But this worry that every comparison must be tolerant or the numerical
analysts will switch back to Fortran is pretty neurotic, and it really
is high time to resolve it. 

If the intersect primitive uses exact comparison, there will be a few
cases where a "tolerant intersections" vanish. If #CT is used, then it
has always seemed wrong to choose one representative value for the
tolerant intersection point. 

I have a third alternative that I've never seen implemented.  If the
intersect primitive used #CT and found items of the left which were
tolerantly equal to some items of the right, it could return all of them.
The only remaining question is whether to treat exactly equal values
specially (so that intersect/V contains 1 2 instead of 1 2 1 2 1 2).
On that point the answer seems obvious.  

The behavior of such a function on nearly intersecting data sets as
#CT goes to zero is to find larger intersection sets for large #CT and
(vanishingly) smaller sets for small #CT.  Appropriately wierd, and
just the sort of thing to attract as many numerical analysts as it
drives away.

How about it DEC, Dyalog, Unisys, IBM, and X3J10?  It's less of a
disaster than "fuzzy floor" and "fuzzy dominoe".

Greg Jaxon
