Post Reply 
Quick HP42S question
05-25-2020, 02:41 AM (This post was last modified: 05-25-2020 02:47 AM by Joe Horn.)
Post: #6
RE: Quick HP42S question
(05-25-2020 12:17 AM)Valentin Albillo Wrote:  If the RNG in Free42 is actually different, how many random numbers will it provide before repeating ? I know the one in the HP-71B and so the HP42S will produce 1,000,000,000,000 random values before repeating...

According to Richard Nelson's article "HP’s Pseudorandom Number Generator" on page 58 of HP Solve #31 (April 2013), the PRNG used in most HP 12-digit-mantissa models from the '71 onward has a cycle length of 5E13, not 1E12.

Also, it produces the same cycle from the same seed on all models EXCEPT the 33s and 35s, which occasionally differ by one digit in the last place due to a bug they introduced in those models, namely, they round the output instead of truncating it like all the other models do. Example:

Seed the random number generator with the square root of 5. Then generate two random numbers. All the non-buggy models output this as the second one:

0.0593946804209

The 33s and 35s alone output this instead:

0.0593946804210

Richard's footnote about this discrepancy follows:

Quote:(7) Bug Hunter Joseph K. Horn explains: “Bottom Line: HP 33s and 35s programs that use random numbers cannot be relied upon to obtain precisely the same results as the other HP models that use the same RNG engine. This is critically important if the RNG is re-seeded with one of these different random numbers; in that case, the random number sequence in the 33s and 35s will diverge from the other models.”
Example of critical divergence: 11 RDZ RAND RDZ RAND RAND RAND --> (Note: RDZ is used to store the seed)
RPL models: 0.975035362027, 0.529463266203, 0.783522353434
33s & 35s: 0.826166290494, 0.626934236292, 0.213277976998
As you can see, the obtained sequence is totally different.

The DM42 agrees with the non-buggy outputs above. I do not have an HP-42S to check whether it is buggy, but the divergence that you are seeing MIGHT be caused by that. Please perform the square root of 5 seed test mentioned above and let us know what you get. Thanks!

<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
Quick HP42S question - Valentin Albillo - 05-24-2020, 11:31 PM
RE: Quick HP42S question - ijabbott - 05-24-2020, 11:36 PM
RE: Quick HP42S question - Thomas Okken - 05-24-2020, 11:37 PM
RE: Quick HP42S question - Thomas Okken - 05-25-2020, 12:29 AM
RE: Quick HP42S question - Joe Horn - 05-25-2020 02:41 AM
RE: Quick HP42S question - ijabbott - 05-25-2020, 09:33 AM
RE: Quick HP42S question - Gerald H - 05-25-2020, 05:30 AM
RE: Quick HP42S question - ijabbott - 05-25-2020, 08:57 AM
RE: Quick HP42S question - Werner - 05-25-2020, 06:40 AM
RE: Quick HP42S question - J-F Garnier - 05-25-2020, 09:06 AM
RE: Quick HP42S question - Albert Chan - 05-25-2020, 05:09 PM
RE: Quick HP42S question - Joe Horn - 05-25-2020, 07:22 AM



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