Hmm... actually, there's a bunch of tests like this already there,
with comments that NaN errors are treated as zeros in this context.

Which suggests that I was wrong about what the fix should be.

I'll shut up now...

-- 
Raul

On Fri, May 6, 2022 at 2:32 PM Raul Miller <rauldmil...@gmail.com> wrote:
>
> Looking at the J implementation, it's pretty clear that
> jsignal(EVNAN); R 0; would signal the NaN error.
>
> But J has a macro -- NANTEST -- which I don't adequately understand,
> and a variation of this logic is used in the NAN1 macro.
>
> (I was looking at the implementation to try and figure out what kind
> of work is involved here... it looks like there's a number of routines
> in va2.c and presumably va2ss.c which would need this test. But
> finding the right place for the test would require understanding what
> the test was testing...)
>
> --
> Raul
>
> On Fri, May 6, 2022 at 2:20 PM Raul Miller <rauldmil...@gmail.com> wrote:
> >
> > Yes:
> >
> > _. in an argument here should signal a NaN error.
> >
> > Thanks,
> >
> > --
> > Raul
> >
> > On Fri, May 6, 2022 at 7:15 AM Elijah Stone <elro...@elronnd.net> wrote:
> > >
> > > _. may give garbage results.  It shouldn't hang.
> > >
> > > On Fri, 6 May 2022, Razetime wrote:
> > >
> > > > Although this does not seem like intended behaviour, it is worth 
> > > > mentioning
> > > > that NuVoc <https://code.jsoftware.com/wiki/Vocabulary/underdot> 
> > > > explicitly
> > > > states that _. is not recommended for use in J computations.
> > > >
> > > > On Fri, May 6, 2022 at 4:30 PM <jph.but...@mailoo.org> wrote:
> > > >
> > > >> Hello,
> > > >>
> > > >>
> > > >>
> > > >> _. does not mix well with logical operators. The following hang and 
> > > >> use a
> > > >> lot of CPU on J 9.03 (Windows and Linux):
> > > >>
> > > >>
> > > >>
> > > >> 1 +.  _.
> > > >>
> > > >> 1 *. _.
> > > >>
> > > >> +. / 8 0 _.
> > > >>
> > > >>
> > > >>
> > > >> Note, that I have no particular use for these sentences, I just 
> > > >> stumbled
> > > >> across them due to a bug in my program.
> > > >>
> > > >>
> > > >>
> > > >> Philip
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> ----------------------------------------------------------------------
> > > >> 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

Reply via email to