pub type LinearCongruentialGenerator128 = GeneralLinearCongruentialGenerator128<0xdb36357734e34abb0050d0761fcdfc15, 0x86e9>;
Expand description
Alias for the default 128-bit GeneralLinearCongruentialGenerator128
with carefully chosen A
and C
.
§Notes
The A
multiplier is chosen based on “Computationally Easy, Spectrally
Good Multipliers for Congruential Pseudorandom Number Generators” paper
by Guy Steele & Sebastiano Vigna.
The C
constant is a prime not dividing A
, chosen based on
“The Art of Computer Programming, Volume 2: Seminumerical Algorithms”
by Donald E. Knuth.
With those parameters, and thanks to the internal state being 128-bit, the generator has a excelent statistical properties. And can be safely used in any simulation scenario. Note that it is not cryptographically secure.
Aliased Type§
pub struct LinearCongruentialGenerator128 { /* private fields */ }