Can you calculate the accuracy of a calculator? I have a phone with an inbuilt calculator. I love to play with calculators. So I did the following and the following was shown by the calculator.
When I went in the scientific tab and wrote $\pi$ it returned $3.1415926535$.
When I wrote $\pi \times 2^{32}$, it wrote $1.34930377\times10^{10}$, which basically is $1349303770$.
Now when I wrote $\frac{1349303770}{\pi\times{2^{32}}}$, it gave me $0.99999966483$.
My question is, can we predict what will my calculator give me when I write $\sqrt3 \times {2^{31}}$? Or when I write anything, can I predict what the calculator will display?
Also, what is the best method to say if a calculator is accurate or not?
According to me, first we must assume that the calculator is taking the values it is showing. Like, it should not be taking values of $\pi$ more accurate or less accurate. Secondly, I think the error must be coming due to the range of values it must be taking. But is there any logical method to determine the range of values a calculator takes?
 A: The precision of a calculator is largely influenced by the number of significant figures used for computation. It is normally greater than the number of digits displayed.
For example, if you compute $\pi$ and it displays $3.141592654$, the actual number stored in its RAM might be $3.14159265\color{blue}{359}$, where the digits in $\color{blue}{\text{blue}}$ denotes the extra figures which are not displayed.
That's the reason why you do not get $1$ from $1349303770/(2^{32} \pi)$: $1349303770$ was the displayed number which you read off from previous result, while the calculator used slightly more significant figures to compute $2^{32}\pi$.
There is an indirect way to count the total no. of significant figures used for computation:


*

*Compute $\sqrt{2}$

*Subtract $1$ from previous result (do not compute $\sqrt{2} - 1$ directly: you must make use of the previous result)

*Compute $1/\text{Previous result}$. This can be tricky because the method to do this depends on the type of calculator. Again, do not type the previous answer manually.

*Subtract $2$ from previous answer

*Repeat Steps 3-4, until you notice a discrepancy between the fractional part of the result from Step 3 and that from Step 1

*The approximate number of extra significant figures would be the total number of subtractions you have made before you notice a discrepancy

*The total number of significant figures is then
$$N = \text{no. of digits displayed} + \text{no. of extra significant figures}$$


Once this is known, you can sort of predict the result of computation by using a more precise calculator, and round off the result to $N$ figures. You might need an advanced calculator for this, such as PARI/GP.
Using my scientific calculator, these are the results:


*

*$1.414213562$ (Step 1)

*$0.414213562$ (Step 2)

*$2.414213562$ (Step 3)

*$0.414213562$ (Step 4)

*$2.414213562$ (Step 3)

*$0.414213562$ (Step 4)

*$2.41421356\color{red}{3}$ (Step 3)

*$0.41421356\color{red}{3}$ (Step 4)

*$2.4142135\color{red}{59}$ (Step 3)


Hence the approximate number of extra significant figures would be $3$ or $4$.
Why this method works: each subtraction causes catastrophic cancellation.
