next up previous
Next: Precision Up: quadratic Previous: quadratic

Roots of a Quadratic:

Suppose we want to solve a quadratic equation

ax^2 + bx + c = 0.

The standard solution is

x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

While this result is correct mathematically, it might cause problems if we use it with numbers that have only limited precision, as we now explain:


Carleton DeTar 2007-08-17