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 11:57:01 -0700
On Nov 25, 2009, at 11:45 AM, Jens Alfke wrote:
You shouldn't be using rand; it's not a good PRNG and it was
obsoleted ages ago by random().
Even the man page tells you not to use it:
Understood... but in an application like mine where I need to query a
random number millions of times... random() is much too slow.
I think the answer is just to take a few numbers of rand() to get the
number I'm looking for.... which is still quite a bit faster than
using random().
Thanks for the reply!
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