Monte Carlo methods: Difference between revisions
Content added Content deleted
Line 1,307: | Line 1,307: | ||
where |
where |
||
rnd = randomRIO (0, 1) :: IO Double |
rnd = randomRIO (0, 1) :: IO Double |
||
go a x = |
|||
rnd >>= (\rx -> rnd >>= (pure . flip (f rx) a)) |
|||
f x y |
f x y |
||
| 1 > x ** 2 + y ** 2 = succ |
| 1 > x ** 2 + y ** 2 = succ |