This Combo generator passes all of the tests in the Diehard battery of tests of randomness (by George Marsaglia). For documentation on the constants for the 12 Multiply With Carry generators click the button to the left.
VBScript program to generate pseudo random integers using a combination of twelve 32-bit Multiply With
Carry generators. The program adds the output of the twelve individual generators modulo 2^32. Each of
the twelve Multiply With Carry generators has a period of about 2^63 or about 10^19. Because the period
of each generator is a different prime number, the periods have no factors in common and the combined
generator has a period which is the product of the individual periods. This makes the period of this
combo generator about 2^755 or about 10^227. The program displays pseudo random integers equal to or
greater than zero and less than 2^32.
The program accepts three optional parameters. The first is the number of pseudo random integers to
display. The default is 10. The second parameter is a seed value between zero and 2^32. The default
is a value based on the system timer. The third optional parameter is a carry value, also between
zero and 2^32. The default carry if no value is supplied is a value based on the system date and time.
The program uses the initial seed and carry values to initialize one of the Multiply With Carry generators
and produce 24 pseudo random 32-bit integers. These 24 values are used to initialize the twelve Multiply
With Carry generators. Two 32-bit integers are required to initialize each generator, one integer being
the initial seed and the other the initial carry. Finally, the program uses the twelve Multiply With
Carry generators to produce and display the number of pseudo random integers requested.
This Combo generator passes all of the tests in the Diehard battery of tests of randomness (by George Marsaglia). For documentation on the constants for the 12 Multiply With Carry generators click the button to the left.
Combo.txt <<-- Click here to view or download the program