Advertisement
Guest User

Untitled

a guest
May 27th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. constant TIMES = 1000_000;
  2. constant CORES = 1;
  3.  
  4. my @results = await ^CORES .map: {
  5. start ^(TIMES / CORES) .map({ rand**2 + rand**2 }).grep: * < 1;
  6. };
  7. say ([+] @results) / TIMES * 4;
  8. say now - INIT now;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement