From: Roy S. <roy...@ic...> - 2010-03-17 15:33:29
|
On Wed, 17 Mar 2010, Derek Gaston wrote: > On Mar 16, 2010, at 5:47 PM, Kirk, Benjamin (JSC-EG311) wrote: > >> not sure, but on my OSX box the first line of 'man srand' says 'bad random >> number generator' > > Just a general warning to everyone out there.... the OSX > implementation of rand() gives EXTREMELY non-random numbers as the > first number after a seed(). Thanks for the warning. I remember having to avoid rand() a decade ago because the implementation sucked for some old Unix. (HP-UX 8? I forget) I'd assumed that was a long-forgotten problem, but my own code uses random()/srandom() thanks to that experience. Any idea whether random() has the same problem on OS X? --- Roy |