New version of MersenneTwister.h (fwd)

Since Ruby uses Mersenne Twister nowadays it might be interesting to know
about the changes (better seeding, new license and faster) that other
implementations has gone through and that would (when time permits of
course) be good to have also in Ruby’s version. Please see below.

Regards,

Robert Feldt

···

---------- Forwarded message ----------
Date: Mon, 19 May 2003 21:00:15 -0400 (EDT)
From: Rick Wagner wagnerr@engin.umich.edu
To: Undisclosed recipients: ;
Subject: New version of MersenneTwister.h

Dear C++ programmer,

As a prior user of my Mersenne Twister random number generator, you might
be interested to know that a new version is now available. See the
attached package or visit

http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html

This version (v1.0, previously v0.8) includes a minor change to the
seeding algorithm plus several new features and optimizations:

(1) The Mersenne Twister inventors discovered that the seed bits were not
uniformly distributed into the generator state. The new algorithm fixes
this problem. Thanks to Takuji Nishimura and Makoto Matsumoto.

(2) The inventors’ revised generator was released under the BSD license
rather than the GNU LGPL. My C++ implementation follows this license
change, making it friendlier for commercial use.

(3) The generator can now be seeded with arrays of any length.

(4) Access functions were added for 53-bit floating-point numbers,
matching the resolution of IEEE doubles. Thanks to Isaku Wada.

(5) By popular demand, there is now an access function for normal
(Gaussian) distributions. Thanks to Bradley Singletary, Ruediger Berlich,
and Christian Bettstetter.

(6) Portability to 64-bit machines was improved by fixing out-of-range
number generation and compiler errors. Thanks to David Henderson.

(7) The generator is now 25% faster overall and 100% faster for integer
[0,n] generation. Thanks to Magnus Jonnson.

This version is a simple drop-in replacement for earlier versions. But be
aware that seeds will produce different sequences now than with the old
generator. The validation tests have been updated to reflect this change.

Thanks to all who have contributed to this open source software! As
always, I welcome your usage notes, bug reports, improvements, and other
feedback.

Richard Wagner
Doctoral candidate
Dept of Chemical Engineering
University of Michigan
rjwagner@writeme.com

Hi,

Since Ruby uses Mersenne Twister nowadays it might be interesting to know
about the changes (better seeding, new license and faster) that other
implementations has gone through and that would (when time permits of
course) be good to have also in Ruby’s version. Please see below.

Current random.c bases on MT19937ar which seems the latest
according to the MT inventors’ page. From that file:

A C-program for MT19937, with initialization improved 2002/2/10.
Coded by Takuji Nishimura and Makoto Matsumoto.
This is a faster version by taking Shawn Cokus’s optimization,
Matthe Bellew’s simplification, Isaku Wada’s real version.

Do you mean this?

···

At Tue, 20 May 2003 13:24:41 +0900, Robert Feldt wrote:


Nobu Nakada

Hi,

Hi,

Current random.c bases on MT19937ar which seems the latest
according to the MT inventors’ page. From that file:

A C-program for MT19937, with initialization improved 2002/2/10.
Coded by Takuji Nishimura and Makoto Matsumoto.
This is a faster version by taking Shawn Cokus’s optimization,
Matthe Bellew’s simplification, Isaku Wada’s real version.

Do you mean this?

Sorry, I was mislead by Richard Wagner’s post and thought there had been
even more updates. It seems the initialization used in Ruby’s version
is the latest one. Forget my post, sorry.

/Robert

···

On Tue, 20 May 2003 nobu.nokada@softhome.net wrote: