Version: 0.1.1 Release date: 2001-11-28 Home page: http://rubyvm.sf.net/subprojects/randomr Tarball: http://prdownloads.sf.net/rubyvm/randomr-0-1-1.tar.gz Author: Robert Feldt Email: feldt@ce.chalmers.se
RandomR addresses all these problems but the crypto-safety which is still on the todo.
require 'random/mersenne_twister' mt = Random::MersenneTwister.new 4357 mt.rand(0) # => 0.424325522 mt.rand(10) # => 9
I've successfully used RandomR with Ruby 1.7.1 (2001-09-20) and cygwin 1.1.8 (gcc version 2.95.2-5 19991024) on Windows 2000 Professional Workstation. If it works for you on other platforms/setups I'd appreciate if you drop me a note. However, it should work on most Ruby-enabled platforms having a C compiler.
NOTE THAT THIS IS AN ALPHA RELEASE SO THERE MIGHT BE BUGS.
Copyright (c) 2001 Robert Feldt, feldt@ce.chalmers.se All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The code for the Mersenne Twister is based on MersenneTwister.h by Richard Wagner. The original code included the following notice:
Copyright (C) 2001 Richard J. Wagner
The original code included the following notice:
Copyright (C) 1997, 1999 Makoto Matsumoto and Takuji Nishimura. When you use this, send an email to: matumoto@math.keio.ac.jp with an appropriate reference to your work.
It would be nice to CC: rjwagner@writeme.com and Cokus@math.washington.edu when you write.
Happy coding!
Robert Feldt, feldt@ce.chalmers.se