Post Reply 
New PRNG algorithms for calculators
02-17-2023, 08:21 PM (This post was last modified: 02-18-2023 12:47 AM by robve.)
Post: #4
RE: New PRNG algorithms for calculators
(02-16-2023 09:03 PM)Namir Wrote:  
(02-16-2023 02:22 PM)Eddie W. Shore Wrote:  I like how simple the 997 algorithms are, they are a god-sent for calculators that do not have the (pseudo-)random function.

Thanks for sharing your in-depth study. Very interesting from a historical perspective!

Note that simple "997" and "983" PRNG algorithms are used in "119 Practical Programs for the TRS-80 Pocket Computer" p.64 Games - Dice Thrower:

20 "R" R=Π+983R
   : R=R-INT R
   : RETURN

and in p.115 Games - "Huh?":

20 L=10L*(L<[E]10)+L*(L>[E]9)
   : R=Π+983R
   : R=R-INT R
   : T=Π+997T
   : T=T-INT T

This is to roll two dice. One dice updates with R=frac(Π+983R) and the other with T=frac(Π+997T).

I didn't see the "983" algorithm results in the links, so perhaps something to add in the future.

- Rob

"I count on old friends to remain rational"
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: New PRNG algorithms for calculators - robve - 02-17-2023 08:21 PM



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