Shuffle

Bill Baxter dnewsgroup at billbaxter.com
Sun Jan 27 12:18:33 PST 2008


Kris wrote:
> I hope tango.core.Array.shuffle got it right?
> 
>> Wrong again. The calculationof "max" should be inside the loop, since it 
>> depends on "n" which is different for each iteration. 

It looks like Tango's shuffle doesn't attempt to eliminate the modulo 
bias in generating a random number.  So it doesn't have attempt to 
calculate any "n" or "max" to begin with.

--bb


More information about the Digitalmars-d-announce mailing list