Monte-Carlo Pi
|
01-19-2022, 09:07 PM
(This post was last modified: 01-22-2022 10:03 AM by Gerson W. Barbosa.)
Post: #19
|
|||
|
|||
RE: Monte-Carlo Pi
(01-11-2022 01:11 PM)J-F Garnier Wrote:(01-11-2022 11:37 AM)Ángel Martin Wrote: I'm putting together a (very humble) RANDOM ROM with a (biased) selection of RNG-related programs and MCODE functions. I'd like to include a Monte-Carlo based calculation of pi, which I *think* has already been published in the forum but can't locate anymore. Any pointers to that reference will be appreciated... Mike (Stgt) has written another HP-41CX program that computes only one random number per iteration, but it requires his VORANOGE (Voyagers' Pseudorandom Number Generator) module. His equivalent HP-15C program might illustrate the method, though: Code:
1356 f A -> 3.141592920 ( ~10s, HP-15C LE) Update: Mike is interested neither in Pi nor in the Monte Carlo method. His motivation is finding the fastest possible implementations. I think he has succeeded, judging by his solutions for both the HP-41CX plus VORANOGE module and the HP-15C: Code:
Code:
This should run also on the HP-11C as RCL RAN# is not needed. We can do some cheating to get an excellent result on the original HP-15C in a reasonable time by choosing proper seed and number of points: 14 STO RAN# 452 f A -> 3.141592920 (7m34s, HP-15C) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Monte-Carlo Pi - Ángel Martin - 01-11-2022, 11:37 AM
RE: Monte-Carlo Pi - Albert Chan - 01-11-2022, 12:19 PM
RE: Monte-Carlo Pi - Andres - 01-11-2022, 12:51 PM
RE: Monte-Carlo Pi - J-F Garnier - 01-11-2022, 01:11 PM
RE: Monte-Carlo Pi - Gerson W. Barbosa - 01-19-2022 09:07 PM
RE: Monte-Carlo Pi - Ángel Martin - 01-29-2022, 10:37 AM
RE: Monte-Carlo Pi - Gerson W. Barbosa - 01-29-2022, 02:58 PM
RE: Monte-Carlo Pi - KeithB - 01-11-2022, 02:12 PM
RE: Monte-Carlo Pi - ttw - 01-12-2022, 10:18 AM
RE: Monte-Carlo Pi - Dave Shaffer - 01-13-2022, 03:30 AM
RE: Monte-Carlo Pi - Csaba Tizedes - 01-11-2022, 05:40 PM
RE: Monte-Carlo Pi - C.Ret - 01-12-2022, 05:33 PM
RE: Monte-Carlo Pi - Ángel Martin - 01-12-2022, 01:50 PM
RE: Monte-Carlo Pi - ttw - 01-13-2022, 01:04 AM
RE: Monte-Carlo Pi - C.Ret - 01-13-2022, 06:14 PM
RE: Monte-Carlo Pi - KeithB - 01-13-2022, 01:58 PM
RE: Monte-Carlo Pi - Gerson W. Barbosa - 01-13-2022, 10:10 PM
RE: Monte-Carlo Pi - Ángel Martin - 01-14-2022, 09:03 AM
RE: Monte-Carlo Pi - C.Ret - 01-14-2022, 05:53 PM
RE: Monte-Carlo Pi - Gerson W. Barbosa - 01-14-2022, 08:31 PM
RE: Monte-Carlo Pi - Joe Horn - 01-15-2022, 05:52 AM
|
User(s) browsing this thread: 1 Guest(s)