Post Reply 
HP 12C Random Integer Number Generator
11-16-2017, 04:58 AM (This post was last modified: 11-16-2017 06:06 AM by Gamo.)
Post: #1
HP 12C Random Integer Number Generator
This program is to generate 6 digits integers for quick pick lottery generator using HP 12C
Using program to calculates uniformly distributed pseudo-random numbers from the HP 12 CP Solution Handbook and added the integer digits that I want.

To use this program: [R/S] then GTO18 [R/S]

Code:

. (decimal)
5284163
STO 0
997
x
FRAC
STO 0
R/S
GTO 10
999999 (6 Digits)
x
1
+
INTG
GTO 00

Example:
[R/S] result 0.83 [GTO 18] result 831,051
[R/S] result 0.27 [GTO 18] result 272,860
[R/S] result 0.20 [GTO 18] result 196,339
[R/S] result 0.75 [GTO 18] result 750,082

Is there any better or shorter solution for this kind of random program?

Thank You

Gamo
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 12C Random Integer Number Generator - Gamo - 11-16-2017 04:58 AM



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