Anonymous user
Monte Carlo methods: Difference between revisions
m
→{{header|REXX}}: updated the output.
m (→{{header|REXX}}: used a simplier comma function, added/changed whitespace and comments, expanded range of iterations.) |
m (→{{header|REXX}}: updated the output.) |
||
Line 1,916:
/*──────────────────────────────────────────────────────────────────────────────────────*/
comma: procedure; arg _; do k=length(_) to 1 by -3; _=insert(',',_,k); end; return _</lang>
<pre>
1 2 3 4 5 6 7
scale: 1·234567890123456789012345678901234567890123456789012345678901234567890123
true pi= 3.141592653589793238462643383279502884197169399375105820974944592307816406+
10,390,000, repetitions: Monte Carlo pi is accurate to 9 places.
</pre>
|