Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- box% ghci
- GHCi, version 8.10.2: https://www.haskell.org/ghc/ :? for help
- Prelude> g x = x^2
- Prelude> g 6
- 36
- Prelude> eps = 1e-6
- Prelude> ddx = \f -> \x -> (f (x+eps) - f x) / eps
- Prelude> ddx g 1
- 2.0000009999243673
- Prelude>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement