in reply to Re:(fongsaiyuk) Generating Random Integers
in thread Generating Random Integers
It is fine to set the seed with srand(), but if you want good randomness, then don't do it quite that way because it clobbers the (probably better) seed that modern versions of Perl pick for you. Instead, add your seed into the mix:
- tye (but my friends call me "Tye")srand( rand(~0) ^ (time() ^ (time() % $]) ) ^ exp(length($0))**$$);
|
---|
Replies are listed 'Best First'. | |
---|---|
(fongsaiyuk)Re: (tye)Re: Generating Random Integers
by fongsaiyuk (Pilgrim) on Jan 03, 2001 at 21:29 UTC | |
by tye (Sage) on Jan 03, 2001 at 21:34 UTC |