Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -0,0 +1,11 @@
|
|||
on montecarlo(n)
|
||||
set m to 0
|
||||
repeat n times
|
||||
set x to random number from 0.0 to 1.0
|
||||
set y to random number from 0.0 to 1.0
|
||||
if x ^ 2 + y ^ 2 < 1 then set m to m + 1
|
||||
end repeat
|
||||
return 4 * m / n
|
||||
end montecarlo
|
||||
|
||||
montecarlo(1000000)
|
||||
Loading…
Add table
Add a link
Reference in a new issue