Hi, 'c' < 'b' doesn't work in APL either but 'c'='d' works in J and in APL.
On Fri, Mar 1, 2019 at 1:15 PM 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > related, > 'c' < 'b' > |domain error > > On Friday, March 1, 2019, 1:03:38 p.m. EST, Raul Miller < > rauldmil...@gmail.com> wrote: > > It does seem ironic that < is both "less than" and "box" but that > "less than" on boxed arguments is a domain error. > > Perhaps, early on, that domain error was seen as more likely to be > useful than a problem? > > (Most likely, though, doing tolerant comparisons on boxed arguments > introduced high complexity issues for an operation like "less than", > and our people who might have the insight to resolve those issues have > had other things to do...) > > Thanks, > > -- > Raul > > On Fri, Mar 1, 2019 at 12:45 PM R.E. Boss <r.e.b...@outlook.com> wrote: > > > > For comparisons we have equal (=) and not equal (~:) and less than (<) > and larger than (>). > > I ignore min (<.) and max (>.) and less or equal (<:) and larger or > equal (>:) since I consider them as direct derivatives of < and >. Also > match (-:) is ignored. > > > > All four (=, ~:, < and >) have dyadic rank 0, but I am more interested > in their differences, which, to me, are rather annoying. > > We get > > =/2 4 ?.@$ 2 > > 0 0 1 1 > > for obvious reasons, and likewise with the 3 other verbs. > > > > But why is the next behavior different? > > =/;/2 4 ?.@$ 2 > > 0 > > ~:/;/2 4 ?.@$ 2 > > 1 > > </;/2 4 ?.@$ 2 > > |domain error > > | </;/2 4?.@$2 > > >/;/2 4 ?.@$ 2 > > |domain error > > | >/;/2 4?.@$2 > > > > Because we can compare the boxed items, as is shown by > > /: ;/2 4 ?.@$ 2 > > 0 1 > > > > Needless to say also the other comparisons go wrong > > <./;/2 4 ?.@$ 2 > > |domain error > > | <./;/2 4?.@$2 > > <:/;/2 4 ?.@$ 2 > > |domain error > > | <:/;/2 4?.@$2 > > > > Of course I can circumvent the errors in one way or the other, e.g. by > using /:, but usually that costs quite some performance. > > Is there any time soon that the techniques which are used to compare > boxed atoms, like used in /: , will be used for < and > too? > > > > > > R.E Boss > > > > ---------------------------------------------------------------------- > > 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 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm