[fpc-pascal] Better random numbers ?

Vinzent Hoefler JeLlyFish.software at gmx.net
Fri Mar 3 13:42:49 CET 2006


On Monday 27 February 2006 08:41, Vincent Snijders wrote:

> BTW, I never would have guessed that the random number generator
> would have used threadvars. I would have thought, that on app start
> you would set one randseed and then call random from all threads.

Considering that the state array for the Mersenne Twister is an 
unprotected global variable, calling random from different threads 
looks like a bad idea to me.

I mean, it surely gives you sort of random values, but ...


Vinzent.




More information about the fpc-pascal mailing list