Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (12 sloc) 494 Bytes
module Y2018.M11.D21.Exercise where
{--
From @fermatslibrary
https://twitter.com/fermatslibrary/status/1061619809669074946
"A curious identity involving π and e:"
1 / (π² + 1) + 1 / (4π² + 1) + 1 / (9π² + 1) + 1 / (16π² + 1) + ... = 1 / (e² - 1)
How many terms do you have to go out for that equation to be accurate within
0.1? 0.01? 0.001? 0.0001?
--}
pie :: Int -> Double
pie nterms = undefined
-- pie returns the value of the sum of the first n π² terms minus the e term