in reply to is rand() random
rand() uses (IIRC) the built-in rand() function on your platform. This is a pseudo-random number generator, not true random numbers. Perhaps the rand() function is not up to snuff on your OS.
BTW, random doesn't neccessarily mean no duplicates. The sequence 5 5 5 5 5 is just as likely as the sequence 3 2 4 1 5 or 1 2 3 4 5. It just doesn't look random to us humans, who are wired for pattern recognition.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re(2): is rand() random
by FoxtrotUniform (Prior) on Jun 19, 2002 at 15:36 UTC |
In Section
Seekers of Perl Wisdom