Exercise 1
Exercise 3
Use floating-point math for more accuracy