A 1 b 7 c 12 Output. Learn Java by Examples. Roots are complex -05 i173205 -05 - i173205.
Given a quadratic equation the task is solve the equation or find out the roots of the equation.
The discriminant of the Quadratic equation is calculated as b²-4 a c. Var result2 -1 b - Mathsqrt Mathpow b 2 - 4 a c 2 a. Tutorials Source Codes SCJP SCWCD and Ebooks. A Quadratic Equation has two roots and they depend entirely upon the discriminant.