- Jan 25, 2014
- 3,922
- 6,018
- Country
- United States
- Gender
- Male
- Faith
- Non-Denom
- Marital Status
- Single
Just a thread to experiment with Linear Congruential Generation (and to increase my post count
).
I use this algorithm a lot when scripting, and in general I enjoy crunching numbers. It's used to simulate randomness, such as in computer graphics and other fields. The equation for this thread is based on the LCG method, and is as follows:
result = ((a * (x + s) + i) % ma) % mb
a is the multiplier (used to significantly increase the input value)
x is the input integer
s is the seed added to the input (in this case, the current date as an integer, i.e.: 10232019)
i is the increment (used to further increase the input value)
m is the modulus, or remainder of division (used to "wrap" the output within a certain, predicted range)
x will start as 0, and will gradually increase by 1 for each succeeding post. The resultant value will be posted in each message, along with the input and equation values. Anyone else is welcome to join in and try to solve it if they wish - fellow number-crunching enthusiasts are welcome. a, s, i and m values can change, but the original post will be updated to reflect any changes.
Initial input and equation values:
a: 10152463
x: 0
s: 10232019
i: 67937503
ma: 100000007
mb: 64


result = ((a * (x + s) + i) % ma) % mb
a is the multiplier (used to significantly increase the input value)
x is the input integer
s is the seed added to the input (in this case, the current date as an integer, i.e.: 10232019)
i is the increment (used to further increase the input value)
m is the modulus, or remainder of division (used to "wrap" the output within a certain, predicted range)
x will start as 0, and will gradually increase by 1 for each succeeding post. The resultant value will be posted in each message, along with the input and equation values. Anyone else is welcome to join in and try to solve it if they wish - fellow number-crunching enthusiasts are welcome. a, s, i and m values can change, but the original post will be updated to reflect any changes.
Initial input and equation values:
a: 10152463
x: 0
s: 10232019
i: 67937503
ma: 100000007
mb: 64
Last edited: