(41C) Roll 2 Dice at Random
|
11-09-2018, 07:44 PM
(This post was last modified: 11-09-2018 07:45 PM by Dieter.)
Post: #2
|
|||
|
|||
RE: (41C) Roll 2 Dice at Random
(11-08-2018 06:34 AM)Gamo Wrote: This is another implementation from my previous post on HP-11C but this one Gamo, why does this program waste no less than four (!) data registers just for adding two random numbers? In R01 you even store a value which is never recalled afterwards. Actually this program dues not require any registers at all – except the one for the seed. Code: LBL "2DICE" The RNG looks interesting, but it can cause problems. Why? Try a seed of 0,006737947 or 0,0982735856 or 0,3328710837. BTW, in an HP41 program you can simply write "FRC", "MOD" and "INT" instead of "XEQ FRC", "XEQ MOD" and XEQ INT". Dieter |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(41C) Roll 2 Dice at Random - Gamo - 11-08-2018, 06:34 AM
RE: (41C) Roll 2 Dice at Random - Dieter - 11-09-2018 07:44 PM
|
User(s) browsing this thread: 1 Guest(s)