Monte Carlo methods: Difference between revisions
Content added Content deleted
Line 669: | Line 669: | ||
<lang Futhark> |
<lang Futhark> |
||
import "futlib/math" |
|||
default(f32) |
default(f32) |
||
Line 710: | Line 710: | ||
let rand_nums = map (sobolIndR (dirvcts())) (iota n) |
let rand_nums = map (sobolIndR (dirvcts())) (iota n) |
||
let dists = map (\xy -> |
let dists = map (\xy -> |
||
let (x,y) = (xy[0],xy[1]) in |
let (x,y) = (xy[0],xy[1]) in f32.sqrt(x*x + y*y)) |
||
rand_nums |
rand_nums |
||