Next: Mersenne Twister, Previous: Basic NAG Generator, Up: Base Generators
The Wichmann-Hill [10] base generator uses a combination of four linear congruential generators (LCGs) and has the form: w(i) = a1 * w(i-1) mod m1, x(i) = a2 * x(i-1) mod m2, y(i) = a3 * y(i-1) mod m3, z(i) = a4 * z(i-1) mod m4 and u(i) = [w(i) / m1 + x(i) / m2 + y(i) / m3 + z(i) / m4] mod 1, i=1,2,... form the required sequence. There are 273 sets of parameters, (a1,a2,a3,a4,m1,m2,m3,m4), to choose from. These values have been selected so that the resulting generators are independent and have a period of approximately 2^(80) [10].