The loss of significant digits in subtracting two approximately equal numbers. This is a frequent cause of poor accuracy in numerical results but it can usually be avoided by some reorganization of the calculation. Consider, for example, the quadratic equationax2 + bx + c = 0The formula for the roots of a quadratic is(−b ± √(b2 − 4ac)/2aif b2 is large compared with 4|ac| severe cancellation occurs in one of the roots. This root can be computed from the fact that the product of the roots is c/a.
ax2 + bx + c = 0
(−b ± √(b2 − 4ac)/2a