Node:QCG, Next:MT19937, Previous:LCG, Up:Definitions
y_n = a * y_{n-1}^2 + b *y_{n-1} + c (mod p) n > 0
prng_new
):
"qcg(p,a,b,c,y0)"
.
prng_is_congruential
is TRUE
.
prng_can_seed
is TRUE
. prng_seed
will be used as
y_{n-1}
in the next call to get_next
.
prng_can_fast_sub
and prng_can_fast_con
are FALSE
.
If p is a power of 2, then a even, b == a + 1 mod 4, and c odd will guarantee period length = p.
No table of good parameters has been published.
Knuth, D. E. "The Art of Computer Programming, Vol. 2 Seminumerical Algorithms", Addison-Wesley, second edition, 1981