From: Gavin Sinclair Date: 2004-08-13T11:26:22+09:00 Subject: Re: Random variable library? Joel VanderWerf wrote: >> I have a Ruby implementation of the ISAAC cryptographically secure >> random number generator packaged with Iowa. Each Crypt::Iowa object >> is an independent source of random numbers. >> >> @random_numbers = Crypt::ISAAC.new >> >> number = @random_numbers.rand(1000) >> >> It does need a little work, but it wouldn't take much to polish it up. > > That's great! I hope it ends up in RAA :) > > Are there any disadvantages? License, memory usage, cpu usage? How about > randomness metrics, compared to something like the MT generators? I'd > guess they'd be better for a crytpo secure PRNG... The work I'm doing now doesn't strictly require, but would benefit from a random number generator that: - obeyed the distribution you want, with the parameters you want - spat out numbers between a given minimum and maximum - could be configured to return Integers or Floats Obviously, it should be able to use any RNG you wish, defaulting to Kernel.rand. I haven't looked at the GSL stuff yet (and wish to avoid C dependencies if possible), but Rand.rb seems to be a good start. When it gets more important for me, I'll try to wrap something up for a library release. Since there are a few people interested in this thread, post your API ideas if you've got 'em! Cheers, Gavin