Base Generator - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English

10.5.1. Base Generator

Base Generator or BRNG is a mathematical algorithm that, given an initial state, produces a sequence (or stream) of variates (or values) uniformly distributed over the semi-open interval (0,1]. Note that this definition means that the value 1.0 may be returned, but the value 0.0 will not. The period of the BRNG is defined as the maximum number of values that can be generated before the sequence starts to repeat. The initial state of a BRNG is often called the seed.

A PRNG is a BRNG that produces a stream of variates that are independent and statistically indistinguishable from a random sequence. A PRNG has several advantages over a True Random Number Generator in that the generated sequence is repeatable, has known mathematical properties and is usually much quicker to generate.

A QRNG is like a PRNG but the variates generated are not statistically independent, being designed to give a more even distribution in multidimensional space.

Many books on statistics and computer science have good introductions to PRNGs and QRNGs, see for example [Knuth] or [Banks]. [Knuth_Link] [Banks_Link]

AOCL-SecureRNG provides AMD hardware-based random numbers which are cryptographically secure.

Also, users can supply a custom-built generator as the base generator for all the distribution generators.

The base generators were tested using the Big Crush, Small Crush and Pseudo Diehard testsuites from the TestU01 software library [TestU01].