A lagged Fibonacci random number generator by George Marsaglia (1999; internet posting).
More...
A lagged Fibonacci random number generator by George Marsaglia (1999; internet posting).
Here is an excerpt from the posting describing this generator: LFIB4 is an extension of the class that I have previously defined as lagged Fibonacci generators: x(n)=x(n-r) op x(n-s), with the x's in a finite set over which there is a binary operation op, such as +,- on integers mod 232, * on odd such integers, exclusive-or (xor) on binary vectors. Except for those using multiplication, lagged Fibonacci generators fail various tests of randomness, unless the lags are very long. To see if more than two lags would serve to overcome the problems of 2- lag generators using +,- or xor, I have developed the 4-lag generator LFIB4: x(n)=x(n-256)+x(n-179)+x(n-119)+x(n-55) mod 232. Its period is 231*(2256-1), about 2287, and it seems to pass all tests—in particular, those of the kind for which 2-lag generators using +,-,xor seem to fail. For even more confidence in its suitability, LFIB4 can be combined with KISS, with a resulting period of about 2410: just use (KISS+LFIB4) in any C expression.
Definition at line 400 of file rng.h.