Re: rand() and srand() broken?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Nov 25, 2009, at 9:26 AM, Derek Gaston wrote: 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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) This email sent to site_archiver@lists.apple.com
participants (1)
-
Jens Alfke