From: Christian Neukirchen Date: 2005-12-07T00:41:39+09:00 Subject: Re: Shuffling an array, sort_by{rand}'s bias Mauricio Fern�ndez writes: > When called with no arguments, rand will use > > static double > genrand_real(void) > { > unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6; > return(a*67108864.0+b)*(1.0/9007199254740992.0); > } > > so it would seem that two consecutive calls to rand() cannot return the > same value, but I still have to think about the effect of qsort. And that is a good thing? How can the sequence be "random" if it never contains the same two numbers in row? (Remember Enigma...) > Mauricio Fernandez -- Christian Neukirchen http://chneukirchen.org