HP Forums
(15C) Buffon's Needle - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (15C) Buffon's Needle (/thread-13609.html)

(15C) Buffon's Needle - SlideRule - 09-08-2019 03:57 PM

An extract from Buffon, [kiyoshiakima url]

"2 Simulation Programs
Buffon's Needle can be implemented easily on all but the smallest HP programmable calculators (the HP-16 and the financial models will need an implementation of the sine function).
2.1 RPN
Some of the earlier machines did not have a built-in RNG (random number generator). One can be programmed, of course, but that requires additional memory. In addition, the HP-25A/C and HP-33E/C don't have enough memory registers unless one packs multiple results into each register (which requires additional code).
The program given here is written for the HP-15C. It takes advantage of the built-in RNG and the capability to DSE any register. Every other model lacks one or both of these capabilities, though neither one by itself takes much programming effort to overcome."