Monte Carlo methods: Difference between revisions

Line 976:
 
 
// TEST with from 1000 samples to 10E8 samples
return range(13, 58)
.map(_x => monteCarloPi(10000000Math.pow(10, x)));
 
// e.g. -> [3.141328814, 3.14097921404, 3.14115413304, 3.1415712142408, 3.14162841420304, 3.14156788]
})();</lang>
</lang>
 
{{Out}} (5 sample runs with increasing sample sizes)
<lang JavaScript>[3.141328814, 3.14097921404, 3.14115413304, 3.1415712142408, 3.14162841420304, 3.14156788]</lang>
 
=={{header|Julia}}==
9,659

edits