Random number generator in HP 30S
02-20-2017, 10:23 PM
Post: #7
 Joe Horn Senior Member Posts: 1,829 Joined: Dec 2013
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-
 « Next Oldest | Next Newest »

 Messages In This Thread Random number generator in HP 30S - Joe Horn - 02-19-2017, 08:02 AM RE: Random number generator in HP 30S - Gerald H - 02-19-2017, 01:03 PM RE: Random number generator in HP 30S - rprosperi - 02-19-2017, 03:06 PM RE: Random number generator in HP 30S - Joe Horn - 02-19-2017, 09:32 PM RE: Random number generator in HP 30S - Paul Dale - 02-19-2017, 10:22 PM RE: Random number generator in HP 30S - ttw - 02-20-2017, 09:14 PM RE: Random number generator in HP 30S - Joe Horn - 02-20-2017 10:23 PM

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