A simple test I discovered years ago for pseudo-random number generators was
to take successive pairs, and plot them on a graph. Bad generators would
show distinct lines after a while.
eg
for (0..10000) {
plot rand(), read()
}
- Roger -
----- Original Message -----
From: "Robert Howard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 07, 2002 9:30 PM
Subject: rand() function
> Is there a statistically better solution for generating random numbers
than
> Perl's built in rand() function? I noticed a couple modules on CSPAN, but
> are they any better? I haven't done a true test of the spread regular
rand()
> gives, but it seems to me to give numbers closer to the top of the range
> specified more often then numbers at the bottom of the range.
>
> R.A. Howard
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]