> So this is really an appeal for code contributions from people who know
> the subject intimately. nhc98 has the same primitive FFI as Hugs/ghc,
> so in theory, one good implementation in a mixture of C + Haskell
> should work for all systems. If you have written one, please make it
> available!
I am not an expert, but I have implemented the Mersenne Twister in
Haskell (I just transliterated the C code). I understand that the
Mersenne Twister is one of the best RNG's out there (if not the best).
I am working on fitting my MT implementation into the RandomGen world;
it shouldn't be too hard. The biggest problem is that it's hard to come
up with a good split operation. I think I'll use the "basic" split that
Tom Pledger posted earlier.
The GSL -- GNU Scientific Library is a C library with a *lot* of random
number generator implementations, as well as a *lot* of functions to
generate special distributions from a uniform RNG:
http://sourceware.cygnus.com/gsl/
Regards,
Matt Harden