On Jan 23, 3:07=A0pm, Bart Braem <bart.br... / gmail.com> wrote:
> On Jan 22, 2:20=A0pm, James Gray <ja... / grayproductions.net> wrote:
>
>
>
> > On Jan 22, 2009, at 5:39 AM, Bart Braem wrote:
>
> > > On Jan 22, 12:13 pm, Lars Christensen <lar... / belunktum.dk> wrote:
> > >> On Jan 22, 11:38 am, Bart Braem <bart.br... / gmail.com> wrote:
>
> > >>> For simulation work, I want to use multiple, independent random =A0
> > >>> number
> > >>> generators. Does anyone know up to date implementations?
>
> > >> What do you mean by independent RNG? Numbers drawn from a single RNG
> > >> are usually independent enough.
>
> > >> Do you mean separate deterministic PRNGs with fixed seeds for
> > >> reproducible sequences? Then take a look at this Ruby Quiz:
>
> > >>http://www.splatbang.com/rubyquiz/quiz.rhtml?id=3D173_Not_So_Random
>
> > > I indeed mean separate deterministic PRNGs with fixed seeds for
> > > reproducible sequences. Interesting to see this was a Ruby Quiz! Are
> > > there solutions without the use of DRb and other libraries?
>
> > Sure. =A0See the first solution link on that page (also shown in the =
=A0
> > quiz write-up).
>
> > James Edward Gray II
>
> The first solution is of course not that efficient, I will be
> generating lots of random numbers. I'm going to take a look at ruby-
> gsl, the ISAAC library gives strange results...
>
> Thanks for your help!

Do not use ISAAC, running this simple test:

          rng =3D Crypt::ISAAC.new
          res =3D Hash.new()
          1.upto(100000) do |i|
            random =3D rng.rand
            larger =3D (random * 10).to_i
            res[larger] ||=3D 0
            res[larger] +=3D 1
          end
          1.upto(10) do |i|
            puts "hits for #{i}: #{res[i]}"
          end

Shows a large bias towards numbers below 0.4, unless I have an error
in this simple script of course.
rb-gsl gives problems with installation, I am going to try the Drb
solution.