1
edit
Changes
→Task Parallelized Pi Program
var counts: [0..#tasks] int;
var rs = new RandomStream(seed, parSafe=false);
const nPerTask = n/tasks,
}
var count = + '''reduce''' counts;
const te = getCurrentTime();
writeln("Approximation of pi = ", count * 4.0 / n);