WH
This is a set of 273 Wichmann-Hill’s combined multiplicative congruential generators (
j
= 1, 2, ..., 273):

WH is a set of 273 different basic generators. This generator is the second basic generator in the NAG libraries. The constants
a
i,j
range from 112 to 127, the constants
m
i,j
are prime numbers ranging from 16,718,909 to 16,776,971, close to 224
. These constants should show good results in the spectral test (see Knuth [Knuth81] and MacLaren [MacLaren89]). The period of each Wichmann-Hill generator may be equal to 292
if not for common factors between (m
1
-1), (,j
m
2
-1), (,j
m
3
-1) and (,j
m
4
-1). However, each generator should still have a period of at least 2,j
80
. The generated pseudo-random sequences are essentially independent of one another according to the spectral test (for detailed information about properties of these generators see [MacLaren89]).
Real Implementation (Single and Double Precision)
The output vector is the sequence of the floating-point values
u
0
,
u
1
, ...
Integer Implementation
The output vector of 32-bit integers
x
0
,
y
0
,
z
0
,
w
0
,
x
1
,
y
1
,
z
1
,
w
1
Thus, the output vector stores practically every quadruple (
x, y, z, w
) of members of the integer output as four 32-bit integers. For example, to get a vector from n quadruples (x, y, z, w
), the size of the output array should be large enough to store 4n 32-bit numbers.
Stream Initialization by Function
vslNewStream
vslNewStream
WH generates the stream and initializes it specifying the 32-bit input integer parameter seed :
- Assumex0=seed mod m. If1x0= 0, assumex0= 1.
- Assumey0= 1,z0= 1,w0= 1.
The test selects a WH generator adding an offset to the named constant
VSL_BRNG_WH: VSL_BRNG_WH+0, VSL_BRNG_WH+1, ... , VSL_BRNG_WH+272
. The following example illustrates the initialization of the seventh (of 273) WH generator:
vslNewStream (&stream, VSL_BRNG_WH+6, seed);
Stream Initialization of Function
vslNewStreamEx
vslNewStreamEx
WH generates the stream and initializes it specifying the the array
params[]
of
n
32-bit integers:
- Ifn= 0, assumex0= 1,y0= 1,z0= 1,w0= 1.
- Ifn= 1, assumex0=params[0] mod m,1y0= 1,z0= 1,w0= 1.Ifx0= 0, assumex0=1.
- Ifn= 2, assumex0=params[0] mod m,1y0=params[1] mod m,2z0= 1,w0= 1.Ifx0= 0, assumex0= 1.Ify0= 0, assumey0= 1.
- Ifn= 3, assumex0=params[0] mod m,1y0=params[1] mod m,2z0=params[2] mod m,3w0= 1.Ifx0= 0, assumex0= 1.Ify0= 0, assumey0= 1.Ifz0= 0, assumez0= 1.
- If n ≥ 4, assumex0=params[0] mod m,1y0=params[1] mod m,2z0=params[2] mod m,3w0=params[3] mod m.4Ifx0= 0, assumex0= 1.Ify0= 0, assumey0= 1.Ifz0= 0, assumez0= 1.Ifw0= 0, assumew0= 1.
Subsequences Selection Methods
| Supported
|
| Not supported
|
| Supported
|
Generator Period

Empirical Testing Results Summary
Test Name
|
|
|
|
|
---|---|---|---|---|
3D Spheres Test
| OK (0% errors)
| OK (0% errors)
| Not applicable
| OK (0% errors)
|
Birthday Spacing Test
| Not applicable
| Not applicable
| Not applicable
| FAIL (60% errors)
|
Bitstream Test
| Not applicable
| Not applicable
| Not applicable
| OK (10% errors)
|
Rank of 31x31 Binary Matrices Test
| Not applicable
| Not applicable
| Not applicable
| N/A
|
Rank of 32x32 Binary Matrices Test
| Not applicable
| Not applicable
| Not applicable
| N/A
|
Rank of 6x8 Binary Matrices Test
| Not applicable
| Not applicable
| Not applicable
| OK (0% errors)[6]
|
Counts-the-1’s Test (stream of bits)
| Not applicable
| Not applicable
| Not applicable
| OK (10% errors)
|
Counts-the-1’s Test (stream of specific bytes)
| Not applicable
| Not applicable
| Not applicable
| OK (0% errors)
|
Craps Test
| OK (20% errors)
| OK (20% errors)
| OK (20% errors)
| OK (10% errors)
|
Parking Lot Test
| OK (10% errors)
| OK (10% errors)
| Not applicable
| OK (10% errors)
|
2D Self-Avoiding Random Walk Test
| OK (10% errors)
| OK (0% errors)
| Not applicable
| OK (20% errors)
|
- The tabulated data is obtained using the one-level (threshold) testing technique. The OK result indicates FAIL < 50%. The run fails when p-value falls outside the interval [0.05, 0.95].
- The stream tested is generated by calling the functionvslNewStreamwith seed=7,777,777.