Post Reply 
(95LX) Linear Congruential Random Number Generator for Solver
01-26-2017, 07:57 AM (This post was last modified: 06-15-2017 01:39 PM by Gene.)
Post: #1
(95LX) Linear Congruential Random Number Generator for Solver
Enter the programme

LCRNG

in Solver.

Store preferred values in R#,AR#, CR# & R#MOD then actuate R# to see the next random number in R# & a random decimal between 0 & 1 in Frct.

Code:

R#=0*IF(AR#=0,L(AR#,7699999939),0)*CR#*IF(R#MOD=0,L(R#MOD, 9199999999999883),0)+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
Find all posts by this user
Quote this message in a reply
Post Reply 




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