Post Reply 
Quick HP42S question
05-25-2020, 07:22 AM
Post: #9
RE: Quick HP42S question
The following comment section in HP's original source code for the HP 48 series gives further support to the random number generator's period being 5E13 long if the seed ends in 1, 3, 7, or 9, which the RDZ code automatically does.

Code:
        STITLE    %RANDOMIZE
*****************************************************************
**
** Name: %RANDOMIZE
**
** Abstract: Updates [RNSEED] by user input (% <> 0) or by
**           the system clock (% = 0).
**
** Stack: % -->
**
** Exceptions: none
**
** Author: All inquiries may be addressed to the late great
**         Homer Russel, wherever he is.
**
** Algorithm:
**
**  x(n+1) = a * x(n) + c  (mod m)
**
**  here: a = 2851130928467  [= 67 (mod 200)]
**        c = 0
**        m = 10^15
**
**  If x(0) # 0  (mod 2) and x(0) # 0 (mod 5) then the period
**  is 5*10^13 (Theorem D, pg. 19 of Knuth Vol. 2).
**
***Date Changed      Programmer            Reason
***------------      ----------      -------------------
**  1/15/86         P. McClellan           packed
** 08/24/89         SB             BugFix: Use SysTime (Not TIME)
*****************************************************************

<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)