Post Reply 
More pseudo random number generators for calculators
07-15-2020, 06:12 AM
Post: #11
RE: More pseudo random number generators for calculators
(07-10-2020 11:25 PM)Namir Wrote:  
(07-09-2020 03:45 AM)ttw Wrote:  A short search on the HP50g gives the following parameters that should work there.

X(j+1)=X(j)*227716313950 mod 549755813507
X(0) not 0

This should generate all integers less than the modulus except zero. The numbers should be small enough not to screw up the division on the HP50g.

(All this assumes that I copied the numbers from the display into the computer correctly.)

I ran your algorithm in my extended calculations. It came out 9th among 56 algorithm (counting the algorithm itself). So it's an OK algorithm and works with calculators that can store the two big numbers and handle well the multiplication of large integers.

Cheers,

Namir

I also tested:

X(j+1)=(X(j)*227716313950 + 22771631395) mod 549755813507

which gave satifactory (better than r = frac997*r) results. The above algorithm handles zero values for X(j).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: More pseudo random number generators for calculators - Namir - 07-15-2020 06:12 AM



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