rMWC1019(n, new.start=FALSE, seed=556677)
``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
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. Rspecifies 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.
rMWC1019(50,new.start=TRUE,seed=492166)
rMWC1019(50)
Run the code above in your browser using DataLab