From: Robert Ware
Subject: random in CMU Common LISP
Date: 
Message-ID: <334D3068.4472@wam.umd.edu>
I am having trouble finding out how CMU Common Lisp generates its random
numbers. Specifically, what kind of random number generator is it and
for what integer values does it remain statistically uniform.
For example: 
>(random 106697365438475775825583498141) ;the number of weak preference
					 ;relations for 25 alternatives
					 ;returns an answer:
90591605181219828451827227380

but what does it mean?

Or maybe someone has a good pseudo random number that can handle numbers
on the order of 2^97.

Thank you, Bob <·····@wam.umd.edu>
From: Raymond Toy
Subject: Re: random in CMU Common LISP
Date: 
Message-ID: <4nu3ldism8.fsf@rtp.ericsson.se>
>>>>> "Robert" == Robert Ware <·····@wam.umd.edu> writes:

    Robert> I am having trouble finding out how CMU Common Lisp
    Robert> generates its random numbers. Specifically, what kind of
    Robert> random number generator is it and for what integer values

The generator is a subtractive Fibonacci-style generator:

	r(n + 1) = (r(n) - r(n-24)) mod 536870908

Random bignums are created by concatenating a bunch of these together
with a small overlap.

    Robert> does it remain statistically uniform. For example:

This generator is probably decent, but Fibonacci-style generators
appear to have some weaknesses.  Sorry, I don't remember what they
are, but you can find many references on the Web.

    >> (random 106697365438475775825583498141) ;the number of weak
    >> preference
    Robert> 					 ;relations for 25
    Robert> 					 ;alternatives returns
    Robert> 					 ;an answer:
    Robert> 90591605181219828451827227380

    Robert> but what does it mean?

The code above generated a random integer from the set 0 to
106997...140.

It's usually up to the programmer to interpret his results. :-)

Ray