Test Cases for Tutorial Problems


      Tutorial 6

      Question 1

      For example, the square root of 5 is 2.23606

      Note: This program will not work correctly for large input numbers because, the initial guess is not good enough for the the function to converge to the correct answer

      Question 2

      If a = 1, b = -6 and c =8, the roots are 4.0 and 2.0

      if a =2, b = 4 and c=7, there are no reals roots (imaginary)


      Back to Main Page for Lecture 6