[EDIT] An alternate view: 64-bit floating numbers represent a discrete set $S$. For a function $f$ to be exactly invertible, it should be a bijection from $S$ to $S$. Suppose we are interested in a fast growing function like $\exp$. At one point, $\exp x > x$.
If $M$ is the maximum element from $S$, then $f(M)\ge M$. The strict version $f(M)> M$ is not allowed, because there is no higher number that $M$ in $S$. Morally, a monotonic function acting like a bijection on a finite set is a permutation, and has very limited degrees of freedom, it is likely to be limited to the identity, or or a counter-identity which reverts the order of elements in the set. Outside these trivial examples, monotonic functions cannot be bijections.
In practice, it is due to finite-precision numerical computations (for instance 64-bit
floating point), that especially affect functions involving irrationals numbers. Integer or sum-of-powers-of-two calculations may be less sensitive. If you dare to plot the numerical error, you get something like:
with Matlab
code
x=linspace(1,10000,10000);
y = exp(log(x))-x;
plot(x,y,'.');
xlabel('x');
ylabel('y');
So you can see that the maximum error spreads with the value. If you want to do something, you can check and threshold a relative error, especially if your variable spread over a large scale.
It get even weirder, if you just swap the functions, say: $\log(\exp(x))-x$, the error is in this case numerically zero.
x=linspace(1,700,10000);
y = log(exp(x))-x;
plot(x,y,'.');
xlabel('x');
ylabel('y');
syms x; exp(log(x))-x
and this gives0
$\endgroup$1e-15
it is bound to be roundoff errors of floating point representation. A 64-bit "double precession" floating point number is good to decimal 15 digits about. $\endgroup$