mt19937 large integers, was: Re: RANDOM() and RANDOM(FALSE) problem
Subject: mt19937 large integers, was: Re: RANDOM() and RANDOM(FALSE) problem
From: Robert Dodier
Date: Tue, 11 Jan 2005 08:35:49 -0800 (PST)
Hi Ray,
I am looking at CMUCL rand-mt19937.lisp and I see that large
integers are generated by overlapping 3 bits of several
random chunks (32 bits). In addition 10 extra bits are generated
and thrown away. This approach was present in the previous
CMUCL rng, rand.lisp.
I don't think this is necessary for MT19937. A page
(http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/efaq.html)
at Matsumoto's web site says to concatenate 32-bit words
to get 64 bits. The source code at his web site
(http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c)
constructs double floats by concatenating 26 and 27 bits without
overlap to get 53.
Maybe we would wish to drop the overlap & extra bits --
(1) A simpler method makes the rng more comprehensible and more
comparable to other implementations. (2) The overlap & extra
bits method suggests some knowledge about the properties of MT19937
which aren't otherwise in evidence.
I have reviewed the Matsumoto & Nishimura paper
(http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/earticles.html)
and I wish that I could divine the properties of concatenated
integers from it, but I can't. Maybe someone else can weigh in.
For what it's worth,
Robert Dodier
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250