0
$\begingroup$

Find the relative error of the function $$f=\frac{a+2b}{c}$$ given the numbers $$a=1,b=1,c=2$$ that were round up to a one digit integer

So intuitively if we take for example $4.2$ and round it to $4$ we change the $10^{-1}$ digit and if it was between $0.0$ to $0.5$ we will round it to $4$ else if it was between $0.5$ to $0.9$ we will round it to $5$ so it is "half the way" or $\frac{1}{2}\cdot 10^{-1}$

  1. I do not know if this intuitively explanation is correct.

  2. There is a formula $\frac{1}{2}\beta^{1-p}$ where $\beta$ is the base and $p$ is the precision or the significant digits, why in this case it is $2$?

$\endgroup$
3
  • $\begingroup$ Is this a part of the context where, for example, $c=a+b$? Please state so, if that is the case. (I suspect there is more context to this, because there isn't much to learn/say about three numbers that wouldn't already be valid for one number.) $\endgroup$ Dec 31, 2019 at 10:33
  • $\begingroup$ @StinkingBishop I have written the full question $\endgroup$
    – newhere
    Dec 31, 2019 at 10:36
  • $\begingroup$ But writing like that $f$ is not a function but a number.. $f = 3/2$ $\endgroup$
    – Gabrielek
    Dec 31, 2019 at 10:38

1 Answer 1

0
$\begingroup$

You can just right down a first order approximation to the relative error:

$$ \varepsilon_f \approx \frac{a}{a+2b} \varepsilon_a + \frac{2b}{a+2b}\varepsilon_b - \varepsilon_c $$

So, for $a=b=1$ and $c=2$, the relative error is approximately given by

$$ \frac 13 \varepsilon_a + \frac 23 \varepsilon_b - \varepsilon_c. $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.