I'd like to understand how absolute and relative errors work in order to write some code.
Suppose, we have x1*=4.54 x2*=3.00
and x3*=15.0
, accuracy: 3 digits.
How do we define:
a. the absolute error of x1*-x2*+x3*
and
b. the absolute relative error of x1*x2*/x3*
c. the accuracy in a and b.
Trying to make sense: a. |e1|<=0.5*10^(-3)
|e2|<=0.5*10^(-3)
|e3|<=0.5*10^(-3)
or |e1|<=0.5*10^(-2)
|e2|<=0.5*10^(-2)
|e3|<=0.5*10^(-1)
and then |e|<=|e1|+|e2|+|e3|=(15+4+3)*0.5*10^(-3)
b. |r|<=|r1|+|r2|+|r3|=|e1/x1*|+|e2/x2*|+|e3/x3*|