Skip to content

Commit 455cbfe

Browse files
committed
Blah.
1 parent 653c6fb commit 455cbfe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Main.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import Data.Ratio
2828
import Data.Decimal
2929

3030
piEst :: Integer -> Decimal
31-
piEst digits = fromRational $ sum [((-1)^n % (2^(10*n + 6))) * sum zipWith (%) numerators denominators | n <- [0..digits],
31+
piEst digits = fromRational $ sum [((-1)^n % (2^(10*n + 6))) * (sum $ zipWith (%) numerators denominators) | n <- [0..digits],
3232
let denominators = map fromIntegral [4*n + 1, 4*n + 3, 10*n + 1, 10*n + 3, 10*n + 5, 10*n + 7, 10*n + 9],
3333
let numerators = map fromIntegral [-2^5, -1, 2^8, -2^6, -2^2, -2^2, 1]]
3434

PiBellards.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
name: PiBellards
55
version: 0.1.0.0
6-
synopsis: Implementation of Bellard's algorithm for computing pi to 'n' digits.
6+
synopsis: Implementation of Bellard's algorithm for calculating pi to 'n' digits in Haskell.
77
-- description:
88
license: MIT
99
license-file: LICENSE

0 commit comments

Comments
 (0)