Post Reply 
New PRNG algorithms for calculators
02-18-2023, 02:28 PM
Post: #7
RE: New PRNG algorithms for calculators
(02-17-2023 08:21 PM)robve Wrote:  
(02-16-2023 09:03 PM)Namir Wrote:  

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 chose the integers like 991, 997, etc in an arbitrary "educated guess" fashion. some did very well (especially in the double-random generators (see Part 1) while others did not do well.

I did not check non-HP books since I was aiming at PRNGs for the HP calculators like the HP-765, HP-41C, HP-2s.

Namir
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: New PRNG algorithms for calculators - Namir - 02-18-2023 02:28 PM



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