Please read the vocabulary page for ?
http://www.jsoftware.com/help/dictionary/d640.htm
In particular the part for 9!:44 and 9!:45.
The RNGs now in use in J can not be completely 
determined by a "seed" which is a single integer.

If you are pining for the old linear conguenial generator,
here it is:

   tick =: [ <....@%~ (* 3 : 'qrl=:(<:2^31)|(7^5)*qrl')@]
   roll =: (<:2^31)&tick"0
   qrl  =: 16807

I understand that it, with its period of _1+2^31, is totally
unacceptable for modern usage.  Some users have
also complained that GB_Flip has too short a period
(_1+2^55).



----- Original Message -----
From: Brian Schott <[email protected]>
Date: Tuesday, February 23, 2010 5:33
Subject: [Jgeneral] GB_Flip RNG seed
To: [email protected]

>       The following behavior is unexpected for the GB_Flip
> RNG. Notice that the verb `roll` produces the same seed
> every time instead of updating the seed each time as is
> required for most simulation studies, for example those that
> employ the random components in batches. Also, in order to
> perform a simulation study which synchronizes the random
> fractions in order to achieve "variance reduction", an
> important strategy, and for other research studies to
> replicate exactly the fractions.
>       The earlier versions of J updated the seed after
> each usage. Only with the implementation of the newer RNG's
> was this feature changed. I request that the old behavior be
> restored at least for GB_Flip.
> 
>    9!:43]1
>    9!:0''
> 16807
>    roll=: monad define
> i=:0
> for. i. y do. ? y
> i=:>:i
> smoutput i,9!:0''
> end.
> )
>    roll 10
> 1 16807
> 2 16807
> 3 16807
> 4 16807
> 5 16807
> 6 16807
> 7 16807
> 8 16807
> 9 16807
> 10 16807
>    9!:42''
> 1
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to