VBScript and PowerShell programs to generate pseudo random integers using a combination of twelve 32-bit Multiply With Carry generators. 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 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 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 programs use the twelve Multiply With Carry generators to produce and display the number of pseudo random integers requested.

These Combo generators pass 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.

The VBScript program is linked below:

Combo.txt <<-- Click here to view or download the program

The equivalent PowerShell script is linked here:

PsCombo.txt <<-- Click here to view or download the program