CBFalconer <> writes:
> Walter Banks wrote:
>>
> ... snip ...
>>
>> A very good practical reference I use for generating random
>> numbers with various distributions is,
>>
>> "Statistical Distributions" N.A.J. Hastings and J.B.Peacock
>> ISBN 0-470-35889-0 QA273.6.H37
>> Halstead Press
>> Distributed by Wiley 1974
>>
>> There are later editions. This book is worth tracking down
>> for anyone who needs good random number generators.
>
> Huh? How can you consider a 'random sequence' with 'controlled
> distribution' to be a random number sequence?
The numbers that result from calling rand() are usually a good
approximation to sampling from a discrete uniform distribution over
[O, RAND_MAX]. By computing some function of the these numbers it is
possible to approximate other distributions. For example,
int bin(void)
{
int r = rand();
return !(r & 1) + !(r & 2) + !(r & 4) + !(r &

+ !(r & 16);
}
will return a pseudo-random number with a binomial distribution.
Controlling the distribution to some extent does not prevent the
sequence from being pseudo-random.
> Or do those phrases
> not mean what I attribute to them?
If you said what you mean by them we'd know!
--
Ben.