Path: utzoo!utgpu!watmath!watdragon!rose!ccplumb
From: ccplumb@rose.waterloo.edu (Colin Plumb)
Newsgroups: comp.sys.amiga.tech
Subject: Re: ARexx psuedo-random number generator
Keywords: ARexx Random Number Generator
Message-ID: <16646@watdragon.waterloo.edu>
Date: 25 Sep 89 03:37:38 GMT
References: <19504@unix.cis.pitt.edu> <1989Sep13.032352.10321@agate.berkeley.edu> <12003@cit-vax.Caltech.Edu> <1989Sep22.082034.1405@agate.berkeley.edu>
Sender: daemon@watdragon.waterloo.edu
Reply-To: ccplumb@rose.waterloo.edu (Colin Plumb)
Organization: U. of Waterloo, Ontario
Lines: 14

In article <1989Sep22.082034.1405@agate.berkeley.edu> mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer) writes:
>> A trick recommended by the authors of
>> _Numerical Recipes_ (in addition to their own, portable generators) is to
>> "scramble " your generator by calling it twice;  the first time is
>> used as an index to an array of numbers from the generator.
>
> Knuth recommends a better version of this - use two generators, one
> to generate indices, one to generate values.

No, if you read Knuth, he says using the same generator is better worst-
case and at least as good on average.  I happen to like his additive
generator (x_n = x_{n-24}+x_{n-55}).
-- 
	-Colin