HP41C random number generator help
|
12-22-2021, 03:58 AM
Post: #29
|
|||
|
|||
RE: HP41C random number generator help
For calculators with 12 digits of precision, the following exact method will work (though the cycle is only 999,958). I can post a modification (which does double the time) to double the cycle length (though not the precision) later.
The seed is any non-zero integer. Recurrence: X(i) = X(i-1) * 423621 mod 999959. X(i)/999959. Will be uniformly distributed on the open interval (0-1). |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)