[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Shufflebug



abigail@delanet.com writes:

> There isn't anything like "bits to spare" when using rand. rand() returns
> a bit pattern. That bit pattern is used to generate the next bit pattern.
> And only that bit pattern is used, and nothing else. 

That's probably true of old libc implementations of rand() (although
my Linux man page for rand() says it uses the same random number
generator as random()).  However, perl's rand() calls either
drand48(), random(), or rand() (depending on what Configure finds);
and the above description is not true of the typical random().  (It is
true of drand48(), according to my Linux man page; I have just
submitted a Perl bug report asking that random() be used in preference
to drand48().)

Carl Witty


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe