Re: rand() and srand() broken?
Re: rand() and srand() broken?
- Subject: Re: rand() and srand() broken?
- From: Jens Alfke <email@hidden>
- Date: Wed, 25 Nov 2009 10:45:42 -0800
On Nov 25, 2009, at 9:26 AM, Derek Gaston wrote:
Hello everyone... I've been struggling with rand and srand on OSX
10.6 and 10.5. It seems to me that something is terribly broken.
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:
RAND(3) BSD Library Functions Manual
RAND(3)
NAME
rand, rand_r, srand, sranddev -- bad random number generator
...
DESCRIPTION
These interfaces are obsoleted by random(3).
—Jens _______________________________________________
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