4

Studying my Numerical Analysis textbook I came to the following definition for significant figures using the relative error:

The number $x^\star$ is said to approximate $x$ to $n$ significant figures if $n$ is the largest nonnegative integer such that $$\left\lvert \cfrac{x-x^\star}{x}\right\rvert \leq 5 \times 10^{-n}.$$

Now, I understand how to apply the definition. Say, if $x=0.501392$ and $x^\star = 0.501377$, then $$ \begin{align*} \left\lvert \cfrac{x-x^\star}{x}\right\rvert &= 0.0000299167 \\ &\leq 0.00005 \\ &= 5\times 10^{-5}, \end{align*} $$

hence $x^\star$ approximates $x$ to five significant figures. What I fail to see is which are those figures, because looking at the numbers I see they coincide in four digits ($0.5013$), so what is this definition really telling me?

One last example: the book uses $y=0.00016$ as the exact number and $y^\star=0.0002$ as the approximation, and calculates the relative error: $$ \begin{align*} \left\lvert \cfrac{y-y^\star}{y}\right\rvert &= 0.25 \\ &\leq 0.5 \\ &= 5\times 10^{-1} \end{align*} $$

This means the approximation is accurate to one significant digit, but looking at $y$ and $y^\star$ they have no single number in common, confusing me even more.

Also, I don't get what role the $5$ plays in the definition. Why that number and not other?

  • 3
    I wonder if we can just never mention significant digits. Not clear to me that we need this concept. – littleO Jul 30 '25 at 15:59
  • 2
    5 is chosen because it is half of 10 and we are working in a base 10 system. This definition is trying to mimic the intuition of rounding. That's why $y^$ is an approximation to 1 significant digit. However, I'm not sure if this definition precisely matches the usual usage of the term "significant digits", given that the divisor is $x$ itself and from your first example of $x^$, something seems a bit off. – Umer Amjad Jul 30 '25 at 16:01
  • 1
    This is not the normal definition. It is percent off, effectively, then expressed via typical significant digits. – RobinSparrow Jul 30 '25 at 16:06

1 Answers1

2

Let's start with the special case where $x^*$ is just $x$ rounded to the nearest integer, which has $n$ digits. By definition of “nearest integer”, we have:

$$|x^* - x| \le 0.5$$

Or equivalently (assuming $x > 0$),

$$\left|\frac{x^* - x}{x}\right| \le \frac{0.5}{x} \tag{1}$$

If $x^*$ is an $n$-digit integer, then:

$$10^{n-1} \le x^* < 10^n$$

For example, with $n = 3$, this formula gives $100 \le x^* \le 1000$. Taking the reciprocal gives:

$$10^{-n+1} \ge \frac{1}{x^*} > 10^{-n}$$ $$10^{-n} < \frac{1}{x^*} \le 10^{-n+1}$$ $$0.5 \times 10^{-n} < \frac{0.5}{x^*} \le 0.5 \times 10^{-n+1}$$ $$5 \times 10^{-n-1} < \frac{0.5}{x^*} \le 5 \times 10^{-n} \tag{2}$$

If we assume that we're not at an edge case where rounding bumps the number up to the next order of magnitude (e.g. $999.8$ rounding up to $1000$), then inequality (2) applies to $x$ as well as to $x^*$. Combining (1) and (2) by transitivity ($A \le B \land B \le C \implies A \le C$), we get:

$$\left|\frac{x^* - x}{x}\right| \le 5 \times 10^{-n}$$

Hence, the formula for the maximum relative error with $n$ significant digits.

Dan
  • 19,542