Skip to content

Instantly share code, notes, and snippets.

@qoelet
Created August 23, 2013 16:24
Show Gist options
  • Save qoelet/6321268 to your computer and use it in GitHub Desktop.
Save qoelet/6321268 to your computer and use it in GitHub Desktop.
-- rewrite after checking the actual formula :X
leibs_pi :: Double -> Double
leibs_pi n = 4 * sum [(-1.0)**n' / (2.0*n' + 1.0) | n' <- [0.0..(n-1)]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment