[Jprogramming] PRNG for J32 & J64

Raul Miller rauldmiller at gmail.com
Fri Oct 14 20:35:57 HKT 2011


On Fri, Oct 14, 2011 at 7:05 AM, Shaw, Ewart <Ewart.Shaw at warwick.ac.uk> wrote:
> I want to generate pseudorandom sequences that are the same for 32- & 64-bit J.
> I need better statistical properties than the old linear congruential generator
> as in 'roll' & 'deal' at   http://www.jsoftware.com/help/release/random.htm .

http://www.jsoftware.com/help/dictionary/d640.htm

These look plausible:

   setRng=: 9!:1,9!:43
   setRng 1
   setRng 3

But for some reason 9!:43 does not seem to do anything on my 32 bit
copy of J, and I do not seem to have a 9!:43 option on 64 bit J that
mimics 32 bit J behavior.

That said, I only tried this on J6, not on J7...

But this looks like a bug.

Thanks,

-- 
Raul


More information about the Programming mailing list