ex3.2.hs 196 B

123456789101112131415
  1. -- Exercise 3.2
  2. -- George C. Privon
  3. -- 2023-09-05
  4. -- a)
  5. f :: Double -> Double
  6. f x = if x <= 0
  7. then 0
  8. else x
  9. -- b)
  10. bigE :: Double -> Double
  11. bigE r = if r <= 1
  12. then r
  13. else 1 / r^2