Monte Carlo methods: Difference between revisions

Content added Content deleted
Line 586: Line 586:


=={{header|EasyLang}}==
=={{header|EasyLang}}==
<lang>intvars
<lang>func mc n . .
func mc n . .
for i range n
for i range n
x# = randomf
x = randomf
y# = randomf
y = randomf
if x# * x# + y# * y# < 1
if x * x + y * y < 1
hit += 1
hit += 1
.
.