B prev next
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

<< RANDOM NUMBER GENERATORS >>

In general, these functions uses Linear Conguential Method (Lehmer, 1948) using 32-bit integers have a period of at most 231 ~ 109. This many random numbers can be generated in seconds on a modern workstation.


The method is employed by an equation of the form:

xn+1 = ( a xn + b ) mod m

where mod means modulo. Constants a, b and m are chosen carefully such that the sequence of numbers becomes chaotic and evenly distributed.