Comment

Comment by endeavour

F# version that fits in a tweet:

  let r,n=Random(),1e7
  let d()=(r.NextDouble()-0.5)**2.0
  [0.0..n]
  |>Seq.sumBy(function _ when d()+d()<0.25->4.0/n|_->0.0)
  |>printfn "%f"
parent endeavour 9 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton