26
edits
Changes
Group 6
,→The Monte Carlo Simulation (PI Calculation)
==== The Monte Carlo Simulation (PI Calculation) ====
Got the code from here:
https://rosettacode.org/wiki/Monte_Carlo_methods#C.2B.2B
It uses random sampling to define constraints on the value and then makes a sort of "best guess."
{| class="wikitable mw-collapsible mw-collapsed"
</pre>
|}
As this algorithm is based on random sampling, so there is only one function that does all the work.
Flat profile:
<pre>
'''Results for different scale of calculation'''
[[File:Yihang.JPG]]