How to use the discriminant calculator
Enter the coefficients of ax² + bx + c = 0 and the tool computes D = b² − 4ac, then classifies the roots from its sign. A positive D means two distinct real roots, zero means a repeated root, and a negative value means two distinct complex roots. The count of real roots also tells you how many times the parabola meets the x-axis.
The important detail is that D is never compared to zero with an equality test. With a = 0.2, b = 1.2 and c = 1.8 the discriminant is 1.44 − 1.44 = 0 on paper, but floating point leaves about -2.2e-16. Judging by sign alone would report complex roots for an equation that really has one repeated real root. This calculator therefore declares a repeated root when |D| < 1e-9 and prints that tolerance in the result label.
When D is positive, √D is shown not only as a decimal but also in exact radical form such as 2√2. The exact form is computed only when D is a whole number no greater than 100 million; otherwise just the decimal approximation appears. The last two rows give the value c = b²/4a that makes the root repeated for the given a and b, and the range of c that still yields real roots. Entering a = 0 is rejected with a message. Values other than D are shown to 8 significant digits, and solving for the roots themselves is not supported on this page.
Frequently Asked Questions
In floating point D rarely lands exactly on zero, so no equality test is used. This tool declares a repeated root when |D| < 1e-9.
If D > 0 the parabola crosses the x-axis twice, if D = 0 it touches at one point, and if D < 0 it never meets the axis. The number of real roots equals the number of crossings.
With a and b fixed, c = b²/4a makes the discriminant zero and the root repeated. The range of c that still gives real roots is shown from that same value.