# Relative error of division

How can I proof that $$Rel(\frac{x}{y})$$ $$\leq$$ $$Rel(x)+Rel(y)$$ where $$Rel(x)$$ is relative error of $$x$$

• What have you tried? Where are you stuck? Also, note that this is only true if $Rel(y)$ is small (or if $y$ has been rounded up). If you try out a couple of examples with $Rel(y)=0.5$, for instance comparing $\frac11$ to $\frac{1}{0.5}$, you will find that the actual bound is quite a bit larger. Commented Nov 16, 2018 at 0:00
• I completly have no idea about this,I proved something like this for addition and multiplication but I can't do anything about division,and also all errors are small Commented Nov 16, 2018 at 1:15
• How did you do multiplication, then? Why doesn't that work for division? Commented Nov 16, 2018 at 2:34
• $Rel(xy)= \frac{| xy-(x-a)(y-b) | }{ | xy |} = \frac{ |ay+bx-ab | }{ | xy | } \leq \frac{ | ay |+ | bx | + | ab |}{ | xy | } = \frac{|a|}{|x|} + \frac{|b|}{|y|}+\frac{|a|}{|x|}\frac{|b|}{|y|}=Rel(x)+Rel(y)+Rel(x)Rel(y)$ Commented Nov 16, 2018 at 10:42
• Cool. And if you try that for division, what happens? Commented Nov 16, 2018 at 10:55

## 1 Answer

If the rounded value of $$x$$ is $$x(1+e_x)$$ and the rounded value of $$y$$ is $$y(1+e_y)$$, then this means $$|e_x|=Rel(x)$$ and $$|e_y|=Re(y)$$. We get $$\frac{x(1+e_x)}{y(1+e_y)} =\frac xy\cdot(1+e_x)\cdot\frac1{1+e_y}$$ Since $$e_y$$ is small (specifically, between $$-1$$ and $$1$$), we have $$\frac1{1+e_y}=1-e_y+e_y^2-e_y^3+\cdots$$ (Usually you go the other way, from the infinite geometric series to the fraction, but the equality is just as valid here.)

This gives us $$\frac xy\cdot(1+e_x)\cdot\frac1{1+e_y}=\frac xy\cdot(1+e_x)(1-e_y+e_y^2-\cdots)\\ =\frac xy(1+e_x-e_y-e_xe_y+e_y^2+e_xe_y^2-\cdots)$$ This means that $$Rel\left(\frac xy\right)=|e_x-e_y-e_xe_y+e_y^2+e_xe_y^2-\cdots|$$ which, after using the triangle inequality, and also removing all higher degree terms, becomes the expression you were after.