Package jdistlib.rng

Class RandomCMWC

All Implemented Interfaces:
Serializable, RandomGenerator

public class RandomCMWC extends RandomEngine

Implementation of CMWC4096 (Complementary-multiply-with-carry) random number generator by George Marsaglia. The period is approximately 2^131086.

Original post

Paper: Marsaglia, George. 2003. Random number generators. Journal of Modern Applied Statistical Methods, 2(1): 2-13. (link)

The 64-bit seed is expanded into the full 4096-word state using SplitMix64. The initial carry is 362436. Corrected unsigned arithmetic changes streams from older releases; serialized states from the broken implementation are rejected.

See Also: