<s>[INST] An Inconsistency in Numerical Approximation Consider the expression 
$$
10^5 - \frac{10^{10}}{1+10^5}.
$$
Using the elementary properties of fractions we can evaluate the expression as 
$$
10^5 - \frac{10^{10}}{1+10^5} = \frac{10^5 + 10^{10} - 10^{10}}{1+10^5} = \frac{10^5}{1+10^5}\approx 1.
$$
Note that the approximation $10^5+1 \approx 10^5$ is used in the last step. Now suppose we use the same approximation, but apply it before we perform the subtraction. We get
$$
10^5 - \frac{10^{10}}{1+10^5} \approx 10^5 - \frac{10^{10}}{10^5} = 0.
$$
The same logic works for 
$$
10^p - \frac{10^{2p}}{1+10^p}
$$
for arbitrary large $p$, so it cannot be simply an issue with the accuracy of the approximation. 
Is there an easy explanation of what's going on here?
 [/INST] It is simply an issue of accuracy of approximation.  Let me write $x = 10^p$.  Then your expression is 
$$ x - \frac{x^2}{1+x}$$
Note that $$\frac{x^2}{1+x} = \frac{x}{1/x + 1} = x (1 - 1/x + O(1/x^2)) = x - 1 + O(1/x)$$
so that
$$ x - \frac{x^2}{1+x} = x - (x - 1 + O(1/x)) = 1 + O(1/x)$$
In your second calculation you only evaluated $x^2/(1+x)$ to within $O(1)$, not $O(1/x)$, so naturally you have an error at the end that is $O(1)$.
</s>