One of the early pseudo-random number generators that is still used today due to its speed and ease of implementation. Not recommended for cryptographic use as the ``quality'' of generated numbers is insufficient. Linear Congruence Generators (LCGs) should also be avoided in geometrical simulations where there is a need to generate random points in dimensions due to serial correlations in the pseudo-random sequence .
The sequence is constructed using the following recursive equation:
where the ``multiplier'' , ``increment'' and ``modulus'' are heuristic constants. The quality of pseudo-random sequences generated by LCGs depends crucially on the good choice of , and . The maximum period after which the sequence will start repeating itself is equal to . In order to speed up computer implementations, traditionally the value of was chosen to be a power of 2. Values lie in the interval [ ). To obtain a pseudo-random floating-point number from the range [ ) , values need to be divided by .
▲Back to this TOP