Determining the types of roots of a quadratic equation