Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ep4
- fatorial x | (x==1) = 1
- | otherwise = x * fatorial (x-1)
- e_x x n | (n==0) = 1
- | otherwise = ( (x**n) / fatorial n ) + (e_x x (n-1) )
- delta' x n | ((exp x) - (e_x x n)) < 0.001 = 0
- | otherwise = 1 + delta' x (n+1)
- delta x = delta' x 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement