Arithmetic Error Revisited
Thomas J. Kennedy
In an earlier discussion, we assumed
- error originates on the operands (i.e., numbers).
- arithmetic operations introduce no additional error.
How would things change if arithmetic operations introduced additional error?
1 Multiplication
Suppose we were multiplying two numbers:
$$ x * y = z $$
To denote finite precision, we need to use the star/chop notation:
$$ z^{*} = (x^{*} * y^{*})^* $$
where
- $x^{*} = x(1 + \epsilon_{x})$
- $y^{*} = y(1 + \epsilon_{y})$
- $z^{*} = z(1 + \epsilon_{z})$
Let us start by expanding all the terms (and cleaning everything up).
\begin{array}{rl} z^{*} &=& (x^{*} * y^{*})^{*} \\ &=& (x^{*} y^{*})^{*} \\ &=& (x (1 + \epsilon_{x}) y (1 + \epsilon_{y}))^{*} \\ &=& (xy (1 + \epsilon_{x})(1 + \epsilon_{y}))^{*} \\ &\approx& (xy (1 + \epsilon_{x} + \epsilon_{y}))^{*} \\ &\approx& (xy (1 + \epsilon_{x} + \epsilon_{y}))(1 + \epsilon_{mult}) \\ &\approx& xy (1 + \epsilon_{x} + \epsilon_{y})(1 + \epsilon_{mult}) \\ &\approx& xy (1 + \epsilon_{x} + \epsilon_{y} + \epsilon_{mult}) \\ \end{array}
We know how to compute the relative error.
\begin{array}{rl} z^{*} - z &=& \frac{| xy (1 + \epsilon_{x} + \epsilon_{y} + \epsilon_{mult}) - xy |}{xy} \\ &=& \frac{| xy (\epsilon_{x} + \epsilon_{y} + \epsilon_{mult})|}{xy} \\ &=& |\epsilon_{x} + \epsilon_{y} + \epsilon_{mult}| \\ \end{array}
Interesting… the only difference is an additional epsilon term (i.e., $\epsilon_{mult}$)
$$ \begin{array}{rl} |\epsilon_{x} + \epsilon_{y}| &vs& |\epsilon_{x} + \epsilon_{y} + \epsilon_{mult}| \\ \end{array} $$
2 Other Operations
How do division, addition, and subtraction change? Those can be practice problems!