Error in the Digital computation
Usually a real number is converted to a discrete value and represent in the Computer.
The smallest increment usually is 2^(-64).
In most computations this should be close enough to a continuous real number, so that the rounding
error do not matter much.
In certain cases, however, when the error got magnified, then this will show a difference.
One example is:
1. Mathematically we have y ( sqrt(x+1) - sqrt(x) ) is identical to y / ( sqrt(x+1) + sqrt (x) )
for any y and x.
2. But in R (or C or SAS or other languages) The two expression could yield different results:
Let x= 500009999998
Let y= 666666666666
3. Guess which expression give a value closer to the trueth ?
We
can determine which is closer to the trueth by using a calculation with
arbitrary presicion (for example 128 bit, i.e.
with an error of 2^(-128) )
In R we can use the package Rmpfr after loading the package, we can define how many digits we want.