Globokim8

2020-10-20

Consider the quantity where a and b are real numbers.
(a) Under what conditions should one expect an unusually large relative error in the computed value of when this expression is evaluated in finite precision arithmetic?
(b)cWs 4-digit (decimal) rounding arithmetic to evaluate both Calculate th relative error in each result.
(c) The expression but it is a more accurate way to calculate this quantity if both a and b have exact floating point representations. Why?

Arnold Odonnell

Solution:
a.The condition is that the computed value is rounded off when this expression is evaluated in finite precision arithmetic.
b.Given:

$=199.01$
4 digit rounding arithmetic we have
The relative error becomes
Conclusion:
Given:

$=\left(199.01\right)\left(0.1\right)$
4 digit rounding arithmetic we have
The relative error becomes
c.The expression when a and b have exact floating point representations because the expression
involves simple addition and subtraction of decimals, then easy multiplication takes place,
however the expression involves squaring of decimals resulting in more decimals , then subtraction takes place. The latter may involves round off whereas the former may not.

Do you have a similar question?