MWC1019              package:SuppDists              R Documentation

_A _v_e_r_y _l_o_n_g _p_e_r_i_o_d _p_s_e_u_d_o-_r_a_n_d_o_m _g_e_n_e_r_a_t_o_r

_D_e_s_c_r_i_p_t_i_o_n:

     A pseudo-random number generator with a period exceeding
     ``10e9824'' due to George Marsaglia

_U_s_a_g_e:

     rMWC1019(n, new.start=FALSE, seed=556677)

_A_r_g_u_m_e_n_t_s:

       n: number of values to generate. If n is a vector, length(n)
          values will be generated

new.start: logical scalar. If TRUE the generator will be started afresh
          using the seed

    seed: scalar 32 bit integer used as the generator seed

_D_e_t_a_i_l_s:

     The following is an email from George Marsaglia on this generator: 

     ``MCW1019  will provide random 32-bit integers at the rate of 300
     million per second (on a 850MHz PC).

     The period of MWC1029 exceeds 10e9824, making it  billions and
     billions ... and billions times as long as the highly touted
     longest-period RNG, the Mersenne twister.   It is also several
     times as fast and takes a few lines rather than  several pages of
     code.   (This is not to say that the Mersenne twister is not a
     good RNG; it is.  I just do not equate complexity of code  with
     randomness.   It is the complexity of the underlying randomness
     that counts.)

     As for randomness, it passes all tests in The Diehard Battery of
     Tests of Randomness <URL: http://stat.fsu.edu/pub/diehard> as well
     as three new tough tests I have developed with the apparent
     property that a RNG that passes  tuftsts.c will pass all the tests
     in Diehard.

     MWC1019 has the property that every possible sequence of 1018
     successive 32-bit integers will appear somewhere in the full
     period,  for those concerned with the ``equi-distribution'' in
     dimensions 2,3,...1016,1017,1018.''

     NOTE:

     The generator requires 1019 initial 32 bit random values to start.
     These are provided by using Marsaglia's MWC generator. By setting
     new.start=FALSE, the sequence may be sampled in blocks. R
     specifies an internal array dimension of 625 for seed length, and
     thus at the present time, it is not possible to implement this
     generator using the .Random.seed mechanism. In this
     implementation, rMWC1019() seems to be about twice as fast as the
     Mersenne-Twister implemented in R.

_V_a_l_u_e:

     generates a vector of random numbers.

_A_u_t_h_o_r(_s):

     Bob Wheeler bwheeler@echip.com

_E_x_a_m_p_l_e_s:

     rMWC1019(50,new.start=TRUE,seed=492166)
     rMWC1019(50)

