BRNG Implementations and Categories


Three implementations are available for every BRNG:

  1. integer implementation (output is a 32-bit integer sequence)

  2. real (single precision)

  3. real (double precision)

You can use the BRNG integer output to obtain random bits or groups of bits. However, when you interpret the output of a generator, you should take into consideration the characteristics of each BRNG in general and its bit precision in particular. For detailed information on implementations of each BRNG, see Basic Random Generator Properties and Testing Results.

All VSL BRNGs are tested by a number of specially designed empirical tests. These tests are applied for floating-point sequences or for integer-valued sequences.

The set of tests for BRNGs fall into the following categories:

  1. tests to analyze the randomness of bits/groups of bits

  2. tests to analyze the randomness of real random numbers normalized to the interval (0, 1)

  3. tests to analyze conformance to the template

Randomness of Bits/Groups of Bits

Use the tests of this category to evaluate the BRNG integer implementation. The viRngUniformBits function corresponds to the integer implementation on the interface level. These tests analyze characteristics of each BRNG and its bit precision in particular. You can use the results of the tests to decide if you can apply this particular BRNG to obtain random bits or groups of bits. A failed test means that the interpretation of the integer output as the stream of random bits may result in an inadequate simulation outcome.

This category also includes a set of tests to determine the degree of randomness of upper, medium and lower bits. For example, upper bits may prove to be much more random than lower. Thus, some tests may indicate which bits or groups of bits are better for use as random ones. 

Randomness of Real Random Numbers

This category contains different tests for BRNG normalized output. You can apply all these tests for real implementation of both single and double precision. Moreover, in most cases, the testing results are identical for both implementations, which proves that non-randomness of lower bits in the original integer sequence does not have practical influence on the randomness of the real BRNG output normalized to the (0, 1) interval. The vsRngUniform and vdRngUniform functions, for single and double precision, respectively, correspond to real implementations on the interface level.

Conformance to the Template

This category contains tests to check how a BRNG output conforms to the template. Template tests variations check if the leapfrog and skip-ahead methods generate subsequences of random numbers correctly. These tests are particularly important because, if any current member of the integer sequence differs from the template in a single bit only, the resulting sequence will be totally different from the template sequence. Also, the statistical properties of such a sequence are worse than those of the template sequence. This assumption is based on the fact that in a variety of sequences there are a very small number of "sufficiently random" sequences. As Knuth suggests, "random numbers should not be generated with a method chosen at random" [Knuth81].