ex4.5.hs 612 B

1234567891011121314151617181920212223242526272829303132
  1. -- Exercise 4.5
  2. -- George C. Privon
  3. -- 2024-07-20
  4. type R = Double
  5. type Time = R
  6. type Position = R
  7. type Velocity = R
  8. type Acceleration = R
  9. type PositionFunction = Time -> Position
  10. type VelocityFunction = Time -> Velocity
  11. type AccelerationFunction = Time -> Acceleration
  12. pos1 :: PositionFunction
  13. pos1 t = if t < 0
  14. then 0
  15. else 5 * t**2
  16. vel1Analytic :: VelocityFunction
  17. vel1Analytic t = undefined
  18. acc1Analytic :: AccelerationFunction
  19. acc1Analytic t = undefined
  20. vel1Numerical :: VelocityFunction
  21. vel1Numerical t = undefined
  22. acc1Numerical :: AccelerationFunction
  23. acc1Numerical t = undefined