random.m and integer overflow

Martin Stein ms40 at inf.tu-dresden.de
Fri Oct 16 10:54:19 AEST 1998


Hi,

I've just investigated the random.m problem:

The 3 constants A, C and M aren't appropriate for a 32 bit signed int! One needs
a 32 bit unsigned int. A*M is arround 2^32. Using a seed a little less than M
should give an integer overflow error. That's all.
Properly A,C and M are a good choice, but not int.

Martin Stein



More information about the users mailing list