On Sat, Jul 08, 2006 at 09:42:43PM +0000, Cesare Marilungo wrote:
> But hydrogen source uses rand() as a random generator, when I've heard
>From the man page:
The versions of rand() and srand() in the Linux C Library use the same
random number generator as random() and srandom(), so the lower-order
bits should be as random as the higher-order bits. However, on older
rand() implementations, and on current implementations on different
systems, the lower-order bits are much less random than the higher-
And even that doesn't matter unless you use only the lower bits.
There is certainly no difference in the distribution if you divide
by RAND_MAX to a [0...1] float result.
Follie! Follie! Delirio vano e' questo!