Post Reply 
Monte-Carlo Pi
01-29-2022, 02:58 PM
Post: #21
RE: Monte-Carlo Pi
(01-29-2022 10:37 AM)Ángel Martin Wrote:  
(01-19-2022 09:07 PM)Gerson W. Barbosa Wrote:  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)

This program doesn't seem to produce more accurate results as the number of iterations gets larger (always starting with the same seed of course), which is counterintuitive to me. Do you see the same ?

Although occasionally there appear some worse (-) results after an increase in the number of iterations, overall I see better (+) results. Perhaps I should test it with more seeds.

seed = 0

1E3 3.2
1E4 3.1593 +
1E5 3.1412 +
1E6 3.141836 +
1E7 3.1414716 +


seed = .1

1E3 3.184
1E4 3.122 +
1E5 3.14352 +
1E6 3.143728 -
1E7 3.1424616 +


seed = .2

1E3 3.196
1E4 3.1348 +
1E5 3.14616 +
1E6 3.143196 +
1E7 3.14122036 +


seed = .3

1E3 3.124
1E4 3.1404 +
1E5 3.13996 +
1E6 3.1452 -
1E7 3.1413036 +

Gerson.
Find all posts by this user
Quote this message in a reply
Post Reply 




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