[fpc-pascal] Re: random numbers

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Mar 9 18:47:09 CET 2006


On 9 mrt 2006, at 18:38, Vincent Snijders wrote:

>> As I noticed, when initialized the randseed with the same value,  
>> the whole rand values in the chain will be totally identical,  
>> which I'm afraid is rather far from what we might expect from a  
>> "real" random number generator!
>
> Indeed, it isn't a real random number generator and in fact this is  
> a good thing, otherwise you wouldn't be able to reproduce any  
> behaviour with a Pseudo RNG. The fact it is Pseudo is advantageous  
> in some cases.

And this behaviour is indeed what many people expect, since it's  
exactly the same in TP and Delphi (and in C).


Jonas



More information about the fpc-pascal mailing list