The i0 gives domain error if the argument exceeds IMAX, which is what you are seeing. This looks like a bug to me. I think the algorithm for deal would work if you just called roll with the extended arguments. Raul, would you like to take that on?
Henry Rich On Wed, Jun 14, 2023, 6:53 PM Raul Miller <rauldmil...@gmail.com> wrote: > This error is coming from > > #0 jtjsignal (jt=0x7ffff7fc0200, e=3) at ../../../../jsrc/d.c:361 > #1 0x00007ffff34b131a in jtcvt () from > /mnt/c/cygwin64/home/15712/jsoftware/jsource/bin/linux/j64avx2/libj.so > #2 0x00007ffff350173e in jtvi (jt=0x7ffff7fc0200, w=0x4b4000) at > ../../../../jsrc/u.c:570 > #3 0x00007ffff3501562 in jti0 (jt=0x7ffff7fc0200, w=0x4b4000) at > ../../../../jsrc/u.c:238 > #4 0x00007ffff36fa6a1 in jtdeal (jt=0x7ffff7fc0200, a=0x7ffff3a3a680 > <Bnum+1088>, w=0x4b4000, > self=0x7ffff3a3b8c0 <primtab+2176>) at ../../../../jsrc/vrand.c:794 > > The issue seems to be the second i0 here > > RE(m=i0(a)); RE(c=n=i0(w)); // c starts as max#+1 > > In u.c, the comment on i0 is: > > // Extract the integer value from w, return it. Set error if > non-integral or non-atomic. Values whose abs > IMAX are converted to > IMAX/-IMAX > > I haven't yet figured out what's wrong with jti0 in this instance. > > FYI, > > -- > Raul > > On Wed, Jun 14, 2023 at 11:54 AM 'Veter Kamenev' via Beta > <b...@jsoftware.com> wrote: > > > > Hi! > > > > 5 ? 2980293480239480239480239480239480239482039x > > > > |domain error, executing dyad ? > > |y must be a positive integer > > > > I read in NuVoc: > > > > y range of random number > > 0 floating-point value in interval (0,1) > > 1 0 (always) > > 2 Boolean > > >1 integer or extended integer from list i.y > > > > https://code.jsoftware.com/wiki/Vocabulary/query#dyadic > > > > Best wishes, > > Veter > > ---------------------------------------------------------------------- > > 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