Quote:
Originally Posted by Thomas Richter
No. The period of a linear congruence random generator does not depend on the seed. It depends on the gcd of the modulo and the multiplier, here 2^32 and, well, the magic number in the code. This number here was not picked at random, so the period is really maximal. It is not in the thousands. Note, however, that this assumes that you pick bits from the MSB on. The period on the LSBs is small.
|
Well ok, but this has a price : the period of the LSBs is very, very small (lower byte starts to repeat after 256 values !). May make it unsuitable, depending on the needs.