For documentation on the constants used for the 12 Multiply With Carry generators in the Combo generator described here, click the button to the left.
VBScript and PowerShell programs have been developed to generate pseudo random integers using a combination of twelve
32-bit Multiply With Carry generators. The result is called a combo generator. The programs add 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 programs display pseudo
random integers equal to or greater than zero and less than 2^32.
The two programs accept 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 programs use the initial seed and carry values to initialize one of the Multiply With Carry generators,
which then is used to produce 24 pseudo random 32-bit integers. These 24 values are used to initialize all 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 programs use the twelve Multiply With
Carry generators to produce and display the number of pseudo random integers requested.
For documentation on the constants used for the 12 Multiply With Carry generators in the Combo generator described here, click the button to the left.
All 12 Multiply With Carry generators, plus the resulting Combo generator pass all of the tests in the Diehard battery of tests of randomness
(by George Marsaglia). The Diehard program and documentation can be downloaded here:
http://stat.fsu.edu/pub/diehard
The VBScript program is linked below:
Combo.txt <<-- Click here to view or download the program
The equivalent PowerShell program is linked here:
PsCombo.txt <<-- Click here to view or download the program