[Ecls-list] Random numbers

Mark Hoemmen mark.hoemmen at gmail.com
Mon May 21 00:33:36 UTC 2007


Juan Jose Garcia-Ripoll wrote:
> Sure! I am also interested in good RNG for Montecarlo. Could you send
> it to jjgarcia at users.sourceforge.net as a diff file against current
> CVS sources?
> 
> Juanjo
> 
> 2007/5/18, Roy Zywina <roy.zywina at gmail.com>:
>> Hi all,
>>
>> I needed a better RNG for a project I'm working on so I've implemented the
>> Mersenne twister algorithm (2^19937 period) in inlined c.  Basically I just
>> redefined "make-random-state" and "random".
>>
>> If theres interest in this code I'd be happy to clean it up and share.

The Mersenne Twister algorithm's authors have an implementation of the 
algorithm; they recently (end of January 2007) updated the code with 
algorithmic and performance improvements:

http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html

I use their RNG in my matrix test codes -- we want a reproducible stream 
of pseudo-random numbers, so we don't want to use the system's RNG (as 
the POSIX standard doesn't specify the RNG's output).  Their (older -- I 
haven't tried the Jan 2007 version) code works straight from the website.

Roy -- did you have a chance to look at the source code on that website? 
  I'd be curious to see what modifications you may have made --

Best,
mfh




More information about the ecl-devel mailing list