This algorithm is provided by the operating system on computers manufactured by Cray Research Incorporated (CRI), and as such it has been heavily used at computer centers employing CRI hardware. We provide it in order to support comparison with the other random number generators provided in the RNG library. This generator suffers from the same patterns in the low order bits as the 64-bit generator, but these patterns become more significant because of the smaller width of the random number state. The next value for the random number state, x[n], is determined from the current value, x[n - 1], by
x[n] = a x[n - 1] (mod248) . | (5) |
Rng_Type RngCRISpawn( Rng_Type *x );
int iRngCRI( Rng_Type *x );
double dRngCRI( Rng_Type *x );
float fRngCRI( Rng_Type *x );
The pattern content of this generator is frightening, making it somewhat amazing that it has been successfully used for so many years. Because this generator duplicates the arithmetic of a commonly used random number generator, and a zeroed state is trapped, it can be useful during the debugging stage of program transformation to a per-particle state approach. Past its utility for debugging purposes, our advice is to only use this generator to check application sensitivity to the quality of the random number stream.