[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interesting problem
Ian Crawford wrote:
> Hmm.... interesting problem.
> Here's what I'm thinking. Write a function that accepts one double
> parameter in the range (0,1). The result of this function should be
> distributed the way you want them to be distributed and should average
> 4.2. Pass the function a random number in the interval (0,1) and you've
> got yourself a random result.
> A couple good math textbooks might speed up your function.
The area under the "normal distribution" may be an
option. IIRC it totals 1. I couldn' get togetether
the mathematical details unfortunately, I forgot almost
all of calculus, etc. :O(