Finding roots of a quadratic equation