|  | Posted by Gert-Jan Strik on 06/15/07 16:14 
> >> Well, that definitely rules out newid() as a "good" pseudo random number> >> generator, then. A sequence of random numbers should have a chance to
 > >> hold duplicates.
 > >
 > >Good observation. And so you correctly concluded that RAND() also does
 > >not do this.
 >
 > Am I reading you incorrectly, or are you saying that the sequence of
 > numbers generated by RAND() never produces the same value twice?
 
 No, I am not saying that. It might, I haven't analyzed the algorithm
 thoroughly. But that doesn't matter. A good pseudo random number
 generator should incorporate the idea that in a range of 2 billion
 values, there is a one in 2 billion chance that the same value is
 selected next. And after that, then again there is a one in 2 billion
 chance it will appear again. And that is something the algorithm doesn't
 do. The algorithm is totally deterministic.
 
 Gert-Jan
  Navigation: [Reply to this message] |