147 and 997 Random Generator Algorithm
|
12-12-2020, 06:19 PM
(This post was last modified: 12-12-2020 09:41 PM by Nihotte(lma).)
Post: #5
|
|||
|
|||
RE: 147 and 997 Random Generator Algorithm
(12-08-2020 06:57 AM)Gamo Wrote: Recently read an old book that teach kid "Math Algorithm" and one of the topic was about the "Random Number Generator." Hi Gamo ! Our dear HP11C is not out of the game or simply forgotten. I suggest you a version of the test module suitable for this machine. I have made it in 2 modules only A first one for the generation of the distribution, based on 147 or 997 for example. Here it is. Code:
With this usage : 6 STO 6 : for draws from 0 to 5 1200 STO 7 : for 1200 draws (you can begin with 120 to see) 997 STO 8 : to test 997, for example GSB A You can read the results of the draws by this sequence : RCL . 0 RCL . 1 RCL . 2 RCL . 3 RCL . 4 RCL . 5 The 2nd one puts the results in the stats registers of the HP11C Here it is. Code:
This is the usage : g CF 0 GSB E - f ŷ, r and x<>y - f L.R. and x<>y g SF 0 GSB E g s and x<>y g x and x<>y Just a word on the results ! Curiously, the results I get on the HP11C seem better for the based 147 distribution than this one for 997 ! With 997 for 6 possibilities on 1200 draws, I get these data in registers : RCL . 0 : 187 RCL . 1 : 184 RCL . 2 : 222 RCL . 3 : 192 RCL . 4 : 223 RCL . 5 : 192 With 147 for 6 possibilities on 1200 draws, I get this data in registers : RCL . 0 : 210 RCL . 1 : 202 RCL . 2 : 191 RCL . 3 : 195 RCL . 4 : 203 RCL . 5 : 199 One more small precision about the program : It supports distribution with 10 numbers rather than 6 but you have to add the next steps at the right position : STO . 6 STO . 7 STO . 8 STO . 9 under g Clx STO . 0 STO . 1 STO . 2 STO . 3 STO . 4 STO . 5 and modify the content of the R6 by 10 rather than 6 ! Beware of the possible adaptation for the HP15C : Σ registers are R0..5 on the HP11C Keep you healthy ! |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
147 and 997 Random Generator Algorithm - Gamo - 12-08-2020, 06:57 AM
RE: 147 and 997 Random Generator Algorithm - Nihotte(lma) - 12-10-2020, 08:50 PM
RE: 147 and 997 Random Generator Algorithm - EdS2 - 12-11-2020, 10:10 AM
RE: 147 and 997 Random Generator Algorithm - Namir - 12-11-2020, 01:21 PM
RE: 147 and 997 Random Generator Algorithm - Nihotte(lma) - 12-12-2020 06:19 PM
|
User(s) browsing this thread: 1 Guest(s)