The distinction between "undefined" and "NaN" is a distinction of
convenience, not a distinction of merit.

-- 
Raul

On Fri, May 6, 2022 at 3:27 PM Elijah Stone <elro...@elronnd.net> wrote:
> It is undefined.  Operations on nan are not guaranteed to produce anything
> sensible (except structural operations and 128!:5).
>
> On Fri, 6 May 2022, Raul Miller wrote:
>
> > But what should the result of _. +. 1 be, if not NaN?
> >
> > Thanks,
> >
> >
> > --
> > Raul
> >
> > On Fri, May 6, 2022 at 2:46 PM Henry Rich <henryhr...@gmail.com> wrote:
> >>
> >> USING a NaN is not an error.  The result is undefined (sc whatever the
> >> hardware produces).  CREATING a NaN is an error.
> >>
> >>     _. = 4
> >> 0
> >>     _. + 4
> >> _.
> >>     _ % _
> >> |NaN error
> >> |   _    %_
> >>
> >> 1 +. _. is not a Boolean operation.  It's calculating the LCM.
> >>
> >> NANTEST calls the OS to see if any NaN-creating operations have been
> >> performed since the most recent NAN0.
> >>
> >> Henry Rich
> >>
> >>
> >> On 5/6/2022 2:35 PM, Raul Miller wrote:
> >> > 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...
> >> >
> >>
> >>
> >> --
> >> 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to