From: Zelphir Kaltstahl <zelphirkaltst...@posteo.de> > my goal is normal distributed floats (leaving aside the finite > nature of the computer and floats).
Warning: I am out of my depth, I can't even spell statisticion, but... The following is either provably correct up to round-off, or totally stupid. First define the cumulative distribution for the normal distribution: $$f(x)= \frac{1}{\sqrt{\pi}} \int_{-\infty}^{x} e^{-x^2/2} dx $$ Now to get a normal random variable, let $u$ be a uniform random number on [0,1), then $f^{-1}(u)$ is a standard normal random variable. Computing the inverse of the cumulative normal distribution is left as an exercise, because I don't know how, but it seems possible. From: Maxime Devos <maximede...@telenet.be> > So, to generate an (approximately) uniform random number on [0,1), you > can simply do > > (define (random-real) > (exact->inexact (/ (random N) N))) > > for a suitably large choice of integer N>0. A choice that makes this nice (on a 32 bit machine) is $N = 2^{32}$. -- Keith