Post Reply 
Good news for PPC Random-Number Generator
05-19-2021, 03:18 PM
Post: #17
RE: Good news for PPC Random-Number Generator
(05-17-2021 09:01 PM)Gene Wrote:  New Seed = Fractional part ( Previous Seed x 9821 + 0.211327 )

Where seed is a decimal number.

This is also the random number generator we put into the 67 FUN rom.

Not to mention the HP-41C Standard Applications book. I'd think this would be the best-known PRNG among HP-41 veterans. Big Grin

Page 24:

Quote:Another interesting portion of this program is the random number generator:

rn+1 = FRC (9821 x rn + .211327)

This generator was developed by Don Malm as pan of an HP-65 Users' Library program. It passes the spectral test (Knuth, V.2 , ยง 3.4) and, because its parameters satisfy Theorem A (op . cit., p. 15), it generates one million distinct random numbers between 0 and 1 regardless of th e value selected for r0. Because the basic random number generator delivers numbers between 0 and 1, it is necessary to do further manipulation of the random numbers to get the integers required for the arithmetic problems. By multiplying the random numbers by an integer N, then taking the integer part, numbers from 0 to N-1 may be generated. This program uses your maximum desired number plus 1 to generate numbers from 0 to your desired maximum.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Good news for PPC Random-Number Generator - Thomas Okken - 05-19-2021 03:18 PM



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