How to tell the exact number of significant digits of a numerical approximation?

383 Views Asked by At

My numerical analysis book uses the same definition for significant digits as stated in this post Why does relative error give number of correct digits?

enter image description here

My question is how can I tell when the number of significant digits that $x$ and $y$ agree on is exactly $t$ or $t+1$? I can't think of a case where they agree on $t+1$ significant digits

1

There are 1 best solutions below

4
On

Let's suppose $\beta=10$ so we are working with decimal numbers.

and as an example suppose $y=1.0002\, x$ for $x>0$.

Then $\frac{|x-y|}{|x|}=0.0002$ and $10^{-4} < 0.0002 \le 10^{-3}$.

If $x=8$ then $y=8.0016$ which agrees with $x$ to $3$ significant digits.

If $x=2$ then $y=2.0004$ which agrees with $x$ to $4$ significant digits.

Whether it is $t$ or $t+1$ significant digits depends on the circumstances of the case, but if the first significant digit of $x$ and the first significant digit of $\frac{|x-y|}{|x|}$ both being small makes $t+1$ more likely