Post Reply 
(100LX) LCPRNG
06-24-2015, 01:30 PM (This post was last modified: 06-15-2017 01:23 PM by Gene.)
Post: #1
(100LX) LCPRNG
The linear congruential pseudo-random number generator

R# := R# * AR# + CR# mod R#MOD

is implemented in this formula:

R#=0*AR#*CR#+L(r,MOD(MOD(MOD(MOD(MOD(L(x,G(R#)-L(i,MOD(G(R#),100000000)))*L(h,G(AR#)-L(j,MOD(G(AR#),100000000))),R#MOD)+MOD(G(x)*G(j),-R#MOD),R#MOD)+MOD(G(h)*G(i),-R#MOD),-R#MOD)+G(i)*G(j),-R#MOD)+CR#,R#MOD))+0*L(Frct,G(r)/R#MOD)*Frct

Enter desired multiplier in AR#, constant in CR# & modulus in R#MOD, then set the seed value in R# (all positive integers < 10^16).

Actuate R# to place the next pseudo-random integer in R#.

Do not press Frct, the value is only for display purposes.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)