You are viewing a single comment's thread. Return to all comments →
Pretty clean recursive solution without having to define any other functions.
calcex :: Int -> Double -> Double calcex 10 x = 1.0 calcex n x = 1.0 + x / (fromIntegral n) * (calcex (n + 1) x) print (calcex 1 x)
Seems like cookies are disabled on this browser, please enable them to open this website
Evaluating e^x
You are viewing a single comment's thread. Return to all comments →
Pretty clean recursive solution without having to define any other functions.