HP 12C Random Integer Number Generator

11042018, 06:02 PM
(This post was last modified: 11042018 06:04 PM by Dieter.)
Post: #8




RE: HP 12C Random Integer Number Generator
(11042018 04:03 PM)SlideRule Wrote: It took a little time to research, but this routine for the Sharp PC1211 from the October 1981 edition of Your Computer (pg.54) matches your range requirement of integers from one to six. The relevant part here is not the range of the random integers but the random number generator itself (whose results are then scaled to 1...6). If I understand this correctly, the method is r := frac[ (r+77) · pi^{5} ] Here pi^{5} is 306,0196848 so that before the FRC command the intermediate result is between 23563,5... and 23869,5..., which in turn means that on a 10digit calculator the resulting random number (between 0 and 1) has merely five significant digits. Can someone say something about other properties of this generator? How does it compare to the simple and fast frac[(r+pi)²] generator? Dieter 

« Next Oldest  Next Newest »

Messages In This Thread 
HP 12C Random Integer Number Generator  Gamo  11162017, 04:58 AM
RE: HP 12C Random Integer Number Generator  Dieter  11162017, 08:06 AM
RE: HP 12C Random Integer Number Generator  Dieter  11192017, 09:23 PM
RE: HP 12C Random Integer Number Generator  Gamo  11202017, 04:46 AM
RE: HP 12C Random Integer Number Generator  Dieter  11202017, 01:45 PM
RE: HP 12C Random Integer Number Generator  Gamo  11212017, 05:13 AM
RE: HP 12C Random Integer Number Generator  SlideRule  11042018, 04:03 PM
RE: HP 12C Random Integer Number Generator  Dieter  11042018 06:02 PM

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