ex5.14.hs 248 B

12345678910
  1. -- Exercise 5.14
  2. -- George C. Privon
  3. -- 2024-07-20
  4. expList :: Double -> [Double]
  5. expList x = [(1 + x/n)**n | n <- [1..]]
  6. -- This function approximates exp(x)
  7. -- When x=1, n=49 in order to get 1% accuracy.
  8. -- When x=10, n=4968 reaches 1% accuracy