On Wed, Dec 07, 2005 at 12:41:39AM +0900, Christian Neukirchen wrote: > Mauricio FernáÏdez <mfp / acm.org> 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...) Nah, I misread genrand_real; the above shows it is possible. -- Mauricio Fernandez