(17B) Random Numbers - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (17B) Random Numbers (/thread-12719.html) |
(17B) Random Numbers - Eddie W. Shore - 04-01-2019 12:18 AM The HP 17B series does not have a random number function. We can use the solver to generate random numbers. Random numbers between 0 to 1 are generator. The format to use will depend on the version of HP 17B you are working with. The code used will use psuedo-random generator: r_i+1 = frac( ( π + r_i)^5 ) Classic HP 17B and HP 17BII: We can use Let and Get to generate random numbers, they are used to generate in recurring sequences. Code: R#=FP((PI+G(R#))^5) Instructions: Enter a starting seed, press (R#). For future random numbers, keep on pressing (R#). Brown and Silver HP 17BII+: We'll use the two variables. Despite the fact that Let and Get are available on the silver HP 17BII+, they cannot be used in recurring sequences. Code: R2#=FP((PI+R1#)^5) Instructions: Enter a starting seed, press (R1#). For the first random number, press (R2#). For future random numbers, press [ STO ] (R1#), then (R2#). Blog entry: https://edspi31415.blogspot.com/2019/03/hp-17bii-normal-distribution-and-random.html |