PROGRAM: Lagged Fibonnacci random number generator using addition.
Based on the implementation of RANMAR in [James].

AUTHOR: Paul Coddington, Northeast Parallel Architectures Center at
Syracuse University, 

VERSION: 1.1

DATE: May 1995.

DESCRIPTION:

 General lagged Fibonnacci generator using subtraction (equivalent to
 using addition), with lags p and q, i.e. F(p,q,-) in Marsaglia's notation.
 
 The random numbers X(i) are obtained from the sequence:
 
    X(i) = X(i-q) - X(i-p)   mod M
  
 where M is 1 if the X's are taken to be floating point reals in [0,1),
 as they are here.
 
 For good results, the largest lag should be at least 1000, and probably
 on the order of 10000.
 
 The following lags give the maximal period of the generator, which is 
 (2^{p} - 1)*2^{n-1} on integers mod 2^n or reals with n bits in the 
 mantissa (see [Knuth] or [Zerler] for a more complete list).
 
     P     Q
   9689   471 
   4423  1393
   2281   715
   1279   418
    607   273
    521   168
    127    63
 

REFERENCES:
 
 P. L'Ecuyer, Random numbers for simulation, Comm. ACM 33:10, 85 (1990).
 
 F. James, "A Review of Pseudo-random Number Generators", 
 Comput. Phys. Comm. 60, 329 (1990).
 
 D.E. Knuth, The Art of Computer Programming Vol. 2: 
 Seminumerical Methods, (Addison-Wesley, Reading, Mass., 1981).
 
 G.A. Marsaglia, A current view of random number generators,
 in Computational Science and Statistics: The Interface,
 ed. L. Balliard (Elsevier, Amsterdam, 1985).
 
 W. Zerler, Information and Control 15, 67 (1969).