Hi,

Well first of all rtfm on Gambit's random number generation, there's a nice API in there for it.

But... I have personally had problems with it _apparently_ generating very non-random output under Win32, but working fine under OS-X.  It seems to loop over a fixed output sequence.  I spent a day trying to isolate the failure conditions, but couldn't; simple test apps seem to work fine and pass standard randomness tests ok but my app gets the patterns.  Short of it is if I drop in another RNG - even good ol' C rand() - I don't get any problems.  (This is Gambit 4.4.2 visual C build btw)

Haven't filed a bug report because I still don't know if it's a Gambit bug or my bug. :(

Anyway, here's a version of Mersenne Twister I hacked in in a great hurry, it solved my problems at the time.  If anyone - esp mathematical types - spot any glaring numerical badness, feel free to send me a fix :-)

Cheers
Darren


lowly coder wrote:
Hi!

  I'm doing some work that involves MCMC / gibbs sampling ... and I need lots of random numbers, fast! I would also like it to be deterministic (after I give it a seed) so debugging / results is replicable. The best I have in mind right now ... is to seed something, impelment rc4, and go with that. Anyone have a better suggestion / something alread implemented in gambit?

Thanks!

_______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list

-- 
Darren Baker
CEO, CTO
Wildfire Studios Pty. Ltd.