Post Reply 
Random number generator in HP 30S
02-20-2017, 10:23 PM
Post: #7
RE: Random number generator in HP 30S
(02-20-2017 09:14 PM)ttw Wrote:  The alternating odd-even behavior might indicate a linear congruential generator with 2^16 modulus.

That's what I strongly suspect.

(02-20-2017 09:14 PM)ttw Wrote:  If you can look at the output in binary, a clue would be that the lowest order bit alternates; the second lowest bit has a cycle of 4; the third order has a cycle of 8, etc.

Aha! You're right! Sequential executions of RANDM*2^16, converted to binary, always exhibit the behavior you describe, but only the last 3 bits. All the higher-order bits seem random.

(02-20-2017 09:14 PM)ttw Wrote:  For a cycle of length 2^16, there are algorithms that can determine the parameters; Google can probably find them.

Time to go hunting! This is exciting!

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Random number generator in HP 30S - Joe Horn - 02-20-2017 10:23 PM



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