Post Reply 
Monte-Carlo Pi
01-14-2022, 09:03 AM (This post was last modified: 01-14-2022 09:05 AM by Ángel Martin.)
Post: #15
RE: Monte-Carlo Pi
(01-13-2022 10:10 PM)Gerson W. Barbosa Wrote:  Just in case the thread from 2011 hasn’t been mentioned yet:

https://www.hpmuseum.org/cgi-sys/cgiwrap...ead=180167

... and here's the HP-41 version of Valentín's brilliant HP-71 code. It uses SEED and RNDM, both functions from the AMC_OS/X module

Just enter the number of points and press R/S.
Obviously very slow on a real HP-41, but very reasonable using V41 in Turbo mode.

Code:
01  LBL "MCPI"
02  STO 00
03  0
04  SEED
05  FIX 0
06  LBL 00
07  RNDM
08  RNDM
09  /
10  RND
11  2
12  MOD
13  -
14  DSE  Y
15  GTO 00
16  FIX 9
17  RCL 00
18  /
19  -4
20  *
21  1
22  +
23  END

Thanks to all again for your inputs.

Cheers,
ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 


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)