Absolute And Relative Error

343 Views Asked by At

I am given the following formulas for absolute and relative error for floating point

$$\Delta=|x-fl(x)|\leq\begin{cases} \frac{1}{2}B^{e-p+1} & \text{For Rounding } \\ B^{e-p+1} & \text{For Chopping} \end{cases}$$

The relative error:

$$\delta=\mid \frac{x-fl(x)}{x}\mid \leq\begin{cases} \frac{1}{2}B^{1-p} & \text{For Rounding } \\ B^{1-p} & \text{For Chopping} \end{cases}$$

Where $P$ is the length of the mantissa

So if I need to bound the error of converting $x=\frac{5}{7}=0.71428571$ by chopping to $5$ digits in the mantissa I get $0.71428*10^0$ so the absolute error should be $10^{0-5+1}=10^{-4}$ and the relative error $10^{1-5}=10^{-4}$

But the book writes that the absolute error is $10^{0-5}=10^{-5}$ what am I doing wrong? the formulas are correct?