1

Consider a number $(x)_\beta$ : $$x = \pm 0.d_1d_2 \ldots d_pd_{p+1}d_{p+2} \ldots \times \beta^E$$ The function $chop(x)$ considers only the first $p$ digits ignoring digits from $(p+1)$th to infinite. So the machine number $\tilde{x}$ is the number obtained from the above function: $$\tilde{x} = chop(x) = \pm0.d_1d_2 \ldots d_p \times \beta^E$$

For the Absolute Error $e_A$ we have : \begin{split} e_A(chop(x)) & = |x - chop(x)| \\ & = 0.\underbrace{00 \ldots 0}_{p \text{ zeros} }d_{p+1}d_{p+2} \ldots \times \beta^E \\ & = 0.d_{p+1}d_{p+2}\ldots \times \beta^{E-p} < \beta^{E-p} \end{split}

For the Relative Error $e_R$ we have that:

\begin{split} |x| & \ge 0.d_1 \times \beta^{E} \\ & = d_1 \times \beta^{E-1} \ge \beta^{E-1} \end{split}

since $d_1 \ne 0$ we have that: $$ \begin{array}{lcl} e_R(chop(x)) & = & \left | \frac{x - chop(x)}{x} \right | & < & \frac{\beta^{E-p}}{\beta^{E-1}} & = & \beta^{1-p} \end{array} $$

We can see that the Relative Error, (conversely from the Absolute Error), doesn't depend from the size of the number, but only from he number of digits of the mantissa. Therefore, if we have many digits in the mantissa, the Relative Error will be smaller.


This is what I want to ask:

In the last part, I don't understand how to obtain that inequality:

$$\begin{align}{} \ldots = \left | \frac{x - chop(x)}{x} \right | < \frac{\beta^{E-p}}{\beta^{E-1}} = \ldots \end{align}$$

I know that:

  • $|x-chop(x)| < \beta^{E-p}$
  • $|x| \ge \beta^{E-1}$

it seems that we have an implication like this, (using a not fully suitable notation) : $$$$\begin{align}{} \frac{\left | x - chop(x) \right | < \beta^{E-p}}{|x| \ge \beta^{E-1}} \Longrightarrow \left | \frac{x - chop(x)}{x} \right | < \frac{\beta^{E-p}}{\beta^{E-1}} \end{align}$$$$

Is there any algebraic-property applied here?

Please, Can you give me any suggestions? Many thanks!

JB-Franco
  • 852

1 Answers1

1

From $|x| \geq \beta^{E - 1}$ we have upper bound for $\frac{1}{|x|}$ (assuming everything is positive) $$ \frac{1}{|x|} \leq \frac{1}{\beta^{E - 1}} \quad (1) $$ we can now apply this and the $$|x - chop(x)| < \beta^{E-p}\quad (2)$$ to $$ \left | \frac{x - chop(x)}{x} \right | = |x - chop(x)|\cdot \frac{1}{|x|} $$ first we use (1) getting $$ |x - chop(x)|\cdot \frac{1}{|x|} \leq |x - chop(x)|\cdot \frac{1}{\beta^{E - 1}}$$ then we use (2) to get the upper bound you are asking about $$ |x - chop(x)|\cdot \frac{1}{|x|} < \beta^{E-p}\cdot \frac{1}{\beta^{E - 1}}. $$

Now the main question I guess is how do we get $$ |x| \geq \beta^{E - 1} \rightarrow \frac{1}{|x|} \leq \frac{1}{\beta^{E - 1}}.$$ The most general rule I think is that when you apply decreasing function to an inequality you have to flip the inequality sign. You are probably familiar with this for multiplication by $-1$ that is apply $f(x) = -1x$ to both sides of inequality. For $$ a \leq b $$ we have $$ -a \geq -b.$$ In this case you are applying $f(x) = \frac{1}{x}$ to both sides of the inequality which is decreasing function so we have $$ a < b \rightarrow \frac{1}{a} > \frac{1}{b}. $$ To demonstrate with numbers $$ 0.5 < 2 \rightarrow \frac{1}{.5} = 2 > \frac{1}{2}. $$ You can also easily see this if you plot the $f$ for positive numbers.

tozitka
  • 26
  • Thanks. Ok I understand what property you have applied, but still I have problems to apply in the case. Can you add any intermediate passages on how to get the upper bound? And also, above, in the beginning we had $\le$, and then we had $<$, why? – JB-Franco May 11 '20 at 15:45
  • and also, from $$\frac{1}{|x|} \le \frac{1}{\beta^{E-1}}, \quad|x-chop(x)| < \beta^{E-p}$$ what we do? we go to multiply the same side? It's unclear, can you explain better this part? thanks. – JB-Franco May 11 '20 at 16:27
  • You can multiply two inequalities (in the same direction), just like equalities, if $a < b$ and $c < d$ then $ab < cd$, to demonstrate with numbers $2 < 3$ and $4 < 5$ yields $8 < 15$. The strict inequality for upper bound comes from strict inequality in $|x - chop(x)| < \beta^{E-p}$. again to ilustrate if you have $2 \leq 2$ and $4 < 5$ you get $8 < 10$. I have added intermediate steps, which do not use this, but in the future it is easier to work with inequalities like this. – tozitka May 15 '20 at 13:20