[A83] Re: Randomization
[Prev][Next][Index][Thread]
[A83] Re: Randomization
I was going to say, didn't you read my message, but I guess it hasn't been
delivered yet :)
The following is a linear congruential function:
X(n+1) = ((a * X(n)) + c) % m
m = modulus (want m > 0)
a = multiplier (want 0 <= a < m)
c = increment (want 0 <= c < m)
X(0) = the seed (want 0 <= X(0) < m)
This information is taken from the following page:
http://primes.utm.edu/glossary/page.php/LinearCongruential.html
This topic came up a month ago on the assembly-86, so I suggest you read the
following post of mine:
http://www.ticalc.org/archives/mail/assembly-86/2001_November/msg00001.html
> Yes, this is the way it's done; Using a recursive function. But can you
give
> us an example of such a function?
Follow-Ups:
References: