# proof: upper bound error of approximating a number with only $n$ decimals precision

Suppose you have a real number $$A$$ and approximate it by only $$n$$ decimal places. Call this number $$a$$. proof that the upper bound of absolute error of this approximation $$|A-a| \le 5 \times 10^{-(n+1)}$$.

Can anyone help me to solve this theorem? I thought that i can use induction technique but it doesn't work.

## 1 Answer

What is the distance between two neighboring numbers with $$n$$ decimal places? $$A$$ is no more than half that from the nearest one.

• Thanks, It's intuitive. But can you provide a mathematical proof? – Alireza Afzal aghaei Oct 9 at 18:15
• I believe this is a proof. You could add some details, starting with justifying the distance statement from the fact that a number with $n$ decimals is an integer times $10^{-n}$. The minimum spacing of integers of $1$ translates to the spacing of the decimals. Then assume your number is more than $5\cdot 10^{n+1}$ from one end of the interval, show that it is less than that from the other end. – Ross Millikan Oct 9 at 18:20