Jump to content

Monte Carlo methods: Difference between revisions

Line 1,526:
rfloat as $x
| rfloat as $y
| if ($x*$x + $y*$y <= 1) then . += 1 else . end)
| 4 * . / $n ;
 
Line 1,548:
1000000 3.141632 0%
</pre>
 
 
=={{header|Jsish}}==
2,478

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.