Re: rand() and srand() broken?
Re: rand() and srand() broken?
- Subject: Re: rand() and srand() broken?
- From: Derek Gaston <email@hidden>
- Date: Wed, 25 Nov 2009 12:47:09 -0700
On Nov 25, 2009, at 12:41 PM, Clark Cox wrote:
> Yes. If you pass the same value to seed(), you will get the same
> sequence of values from rand(). Period. Any implementation of
> srand/rand that does not do this is broken. From the C Standard:
Indeed... note that this wasn't about passing the _same_ value... it was about passing similar values to srand... like singularly increasing integers...
Derek _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden