finds roots of a quadratic equation using bisection method