The pseudo-random number generator discussed is the one provided by Microsoft in its Visual Basic library, used by Visual Basic itself and its variant, VBA. Most generators that are supplied with 3GL and 4GL languages are very standard and are variations of the Linear Congruential Pseudo-Random Number Generators (LCPRNGs). Read More...
Linear congruential generators (LCG) are a form of random number generator based on the following general recurrence relation: x k + 1 = g ⋅ x k mod n Where n is a prime number (or power of a prime number), g has high multiplicative order modulo n and x 0 (the initial seed) is co-prime to n.
In Excel 2007, RAND () used a linear congruential generator with a period of ~ 2^44. In Excel 2010, RAND was changed to use a Mersenne Twister algorithm with a ridiculously long period (~2^19937) Rnd () can be initialized to restart with any number in the pattern, which is convenient for test. RAND () cannot. Paul Ked Active Member Joined
Theses sequences are not truly random because the underlying generation is determined by an algorithm: they are actually deterministic. For example, a linear congruential generator (LCG) generates a random b-bit integer with the recursion X n+1 = (a X n + c) mod 2 b With initial random seed (starting number) X 0. [4]
A linear congruential generator is an algorithm that yields a sequence of pseudo-randomized numbers calculated with a discontinuous piecewise linear equation. The method represents