Monte Carlo methods: Difference between revisions
Content added Content deleted
(→{{header|REXX}}: changed/added comments and whitespace, changed indentations, increase true value of pi (digits), elided the ASCII pi glyph, simplified the SAY statement.) |
m (→{{header|REXX}}: updated the running output for the program.) |
||
Line 1,541: | Line 1,541: | ||
true pi=3.141592653589793238462643383279502884197169399375105820974944592307816406+ |
true pi=3.141592653589793238462643383279502884197169399375105820974944592307816406+ |
||
10,000 repetitions: Monte Carlo pi is accurate to 3 places. |
10,000 repetitions: Monte Carlo pi is accurate to 3 places. |
||
20,000 repetitions: Monte Carlo pi is accurate to 4 places. |
|||
630,000 repetitions: Monte Carlo pi is accurate to 5 places. |
|||
700,000 repetitions: Monte Carlo pi is accurate to 7 places. |
|||
20,950,000 repetitions: Monte Carlo pi is accurate to 8 places. |
|||
26,130,000 repetitions: Monte Carlo pi is accurate to 10 places. |
|||
Error 4 running "c:\montecpi.rex", line 15: Program interrupted |
Error 4 running "c:\montecpi.rex", line 15: Program interrupted |
||
</pre> |
</pre> |