Skip to content
Snippets Groups Projects
Select Git revision
  • 19362e342f73dc889bc3ecac93da7c0733d49b93
  • master default
2 results

computeHistoricalMonthly.Rmd

Blame
  • exA2.hs 223 B
    approxPi :: Int -> Double
    approxPi n | n <= 0 = error "negative numbers or 0 cannot be used for approximations of pi"
               | otherwise = 2 * sum [product [1..a] / product [1,3..2 * a + 1] | a <- [0..fromIntegral n-1]]