I have been given this example 2.0013−2.0005=0.0008. The destructive cancellation is the large common value, here the 2, that disappears.
I do not quite understand what destructive cancellation is, can someone explain it please?
115 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
$$ \begin{align} 2.314890251 - 2.314890254 & = -0.000000003 \\[8pt] 2.314890251 - 2.314890253 & = -0.000000002 \end{align} $$ One of these is $3\times\text{something}$ and the other is $2\times\text{something}$, where "something" is the same in both cases. For some purposes the ratio of $3$ to $2$ might be the information you're looking for. It might be important that it's not $3$ to $1$.
So round the numbers above: $$ \begin{align} 2.315 - 2.315 & = 0 \\[8pt] 2.315 - 2.315 & = 0 \end{align} $$ All of the information you're looking for has been lost.
A book called Numerical Methods that Work has an example of a geometric problem in an engineering application in which a number is sought that is known to be a solution to a quadratic equation. One of the two is close to $0$, and the other is large. The one close to $0$ is needed. So look at $$ \frac{-b\pm\sqrt{b^2-4ac}}{2a} $$ The solution with "$+$" rather than "$-$" is needed, and that gets lost as seen above. The practical solution is: Start with $0$ as the first approximation. Put the $n$th approximation in place of $x$ in the quadratic term but not the linear term. The solution to the resulting first-degree equation is the $(n+1)$th approximation.
Suppose $x$ and $y$ are known to five significant figures: $x \approx 2.0013$ and $y \approx 2.0005$. This means that $2.00125 \le x \le 2.00135$ and $2.00045 \le y \le 2.00055$ (some of the $\le$ signs can be replaced by $<$ signs, but exactly which ones depends on the rounding mode used).
But then if $z = x - y$, all we can confidently say about $z$ is that $0.0007 \le z \le 0.0009$, so $z$ is not even known to $1$ significant figure.
Destructive cancellation is this catastrophic loss of significant figures that can occur when subtracting two almost equal floating-point numbers.