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