in reply to Re: Perl rand() generates larger numbers for small sample size, bug!
in thread Perl rand() generates larger numbers for small sample size, bug!

Provide more info on your perl version, etc? Unable to replicate this finding (on x86_64-linux):

$ perl5.12.3 -we '$rand{ rand() }++ for 1..2**22; print int keys %rand +' 4194304 $ perl5.18.1 -we '$rand{ rand() }++ for 1..2**22; print int keys %rand +' 4194304

  • Comment on Re^2: Perl rand() generates larger numbers for small sample size, bug!
  • Download Code