Last active
December 30, 2015 16:19
-
-
Save skaslev/7854002 to your computer and use it in GitHub Desktop.
*Main> pie - pi
3.269553516815904e-10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fromDFE dfe n = iter 0 | |
| where | |
| slip x = -1 / x | |
| iter k | k == n = dfe k | |
| | otherwise = (dfe k) + slip (iter (k+1)) | |
| pie = fromDFE dfe 500 | |
| where | |
| dfe 0 = 3 | |
| dfe 1 = -8 | |
| dfe 16 = -3 | |
| dfe 308 = -3 | |
| dfe _ = -2 | |
| main = print pie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment