Re: mt19937 large integers, was: Re: RANDOM() and RANDOM(FALSE) probl em



>>>>> "Robert" == Robert Dodier  writes:

    Robert> I am looking at CMUCL rand-mt19937.lisp and I see that large
    Robert> integers are generated by overlapping 3 bits of several 
    Robert> random chunks (32 bits). In addition 10 extra bits are generated
    Robert> and thrown away. This approach was present in the previous 
    Robert> CMUCL rng, rand.lisp.

    Robert> I don't think this is necessary for MT19937. A page 

I agree.  The overlap stuff is a holdover from the original lagged
Fibonacci generator, which was carried over to the mt19937 generator
for whatever reason.

    Robert> (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/efaq.html)
    Robert> at Matsumoto's web site says to concatenate 32-bit words
    Robert> to get 64 bits. The source code at his web site
    Robert> (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.
    Robert> c)
    Robert> constructs double floats by concatenating 26 and 27 bits without
    Robert> overlap to get 53.

CMUCL generates a 32-bit int and a 21-bit int and smashes that into
the mantissa of a 1d0.

Ray