On Nov 30, 2005, at 1:28 AM, Nuralanur / aol.com wrote:

> the GNU Scientific Library (GSL) includes pseudo random number   
> generation
> methods.
> There is a Ruby binding for this library (Ruby-GSL).

Try this, if you don't need high performance...

def rand_normal_float(mean = 0.0, variance = 1.0)
   # sum 12 random numbers uniformly distributed in [0,1]
   sum = 0.0
   12.times { sum += Kernel.rand }
   # adjust for mean and variance
   (variance.to_f * (sum - 6.0)) + mean.to_f
end

--Steve