I believe I found a path to getting some compatibility with 64 and 32 bit random numbers from 128!:4
on 64 bit (j802), for gflip and (sometimes :( ) dx1597, (gbflip shown) 9!:43 ] 1 (#. 31 # 1) (17 b. ,. [ 17 b. (>: @[) <.@%~]) 128!:(4) 12 [ 9!:1 ] 2144967295 1802806718 580845627 874620594 1892471976 814573531 1510653888 85786363 1708761784 1618814922 1991958243 406506608 1667805172 2115659997 224533775 1548903184 386399315 773650204 744907186 1296945786 951079490 832466854 1277704287 452283733 827533099 on j6 32 bit, 9!:43 ] 1 _3 ,\ 128!:(4) 36 [ 9!:1 ] 2144967295 1802806718 580845627 1826237948 874620594 1892471976 857633281 814573531 1510653888 1643368337 85786363 1708761784 303847588 1618814922 1991958243 1652317000 406506608 1667805172 1630582125 2115659997 224533775 908067264 1548903184 386399315 1482563692 773650204 744907186 1764565776 1296945786 951079490 544996256 832466854 1277704287 692481379 452283733 827533099 326892818 Any ideas what operation to the 64bit raw stream would produce the 3rd column in the 32 bit stream? both gbfllip and dx1597 get the same state (9!:44) set by a 9!:1 seed in 32 and 64 bit modes. So there is probably a conversion factor possible for dx1597 too. some suggested enhancements to J I would like: a 32 bit version of 128!:4 on 64 bit versions (and/or) an argument to RNG select that uses the 32 bit mersenne Twister algorithm with 32 bit raw generator ----- Original Message ----- From: Pascal Jasmin <[email protected]> To: "[email protected]" <[email protected]> Cc: Sent: Wednesday, April 16, 2014 11:11:55 AM Subject: Re: [Jprogramming] 32 and 64 bit compatibility for ? and 9!:1 that happens to be the same as J6 -32. Is android 32 bit? 128!:4 seems to be different than the "advertised spec" on 64 bit windows versions: It produces apparent 64 bit range numbers instead of 2^32 advertised upper bound for Mersenne Twister. ----- Original Message ----- From: Joe Bogner <[email protected]> To: [email protected] Cc: Sent: Wednesday, April 16, 2014 11:05:53 AM Subject: Re: [Jprogramming] 32 and 64 bit compatibility for ? and 9!:1 Android results are different ? 10 $ 100 [ 9!:1 ] 79 233 122 69 66 18 2 40 41 94 12 72 87 On Apr 16, 2014 10:51 AM, "Pascal Jasmin" <[email protected]> wrote: > this gives consistent results accross 64 bit versions of J on windows > (default Mersenne Twister) > > ? 10 $ 100 [ 9!:1 ] 79 233 122 > 99 45 95 82 5 12 75 0 88 21 > > > does it also give the same result on 64bit android osx linux? > > On J6-32, there is a different result. > > I notice that 9!:44 structure appears to be: > 2 (Mersenne T RNG; offset taken so far; 312 64 bit numbers or 624 32 bit > numbers depending on J version. > > for 9!:45, it appears as though the length of the 3rd box must match 312 > or 624. > > Also ?. provides different results in 32 vs 64 bits > > Is there a possible conversion for seed or state that will produce the > same results on 32 and 64 bits? > > 624 = 312 * 2... perhaps there is some alternate memcopy procedure? > > tried _2*/\624 $ list of 32 bit numbers for 3rd box, but gives a domain > error on 64 bits, even though it produces the right 312 shape. So it > appears the state array must be less than 64 bit values. > ---------------------------------------------------------------------- > 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
