On Mon, Feb 03, 2003 at 14:08:41 +0300, Andrey A. Chernov wrote:
> On Mon, Feb 03, 2003 at 10:55:42 +0000, Mark Murray wrote:
> > 
> > How do you _know_ that your newly chosen magic number isn't going to cause
> > some kind of recurring (and too-short) sequence of numbers?
> 
> I run simple test for it, it is not too short.

To be more specific - it never returns to 0 from this value at least in 
2**31 iterations. You can test it by yourself, the code is obvious:

srand(0)
... loop ...
if (rand() == 0)
        print iteration number

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to