Machine error in computer arithmetic I'm wondering if if is possible to have a function $f$ such that there exists $x,y$ such that we have $f_t(x) &gt; f_t(y)$ where $f_t$ denotes the true value of $f$ and $f_a(x)&lt;f_a(y)$ where $f_a$ denotes the value of f as stored in a computer? (I am referring to floating point numbers and numerical analysis)

I am looking at programs that solve equations and so am concerned about if my programs will work in extreme cases. Things like if I have a function that is extremely close to $0$ in an absolute sense over the interval and I want to find the root. (In this case I think I can make an argument that if $f_t(x) \geq 0$, then we must have that $f_a(x) \geq 0$.) But if I'm looking for a maximum of a function that is almost constant, say $g$,  then I don't think I know that $g_t(x) &gt; g_t(y)$ implies that $g_a(x) &gt; g_a(y)$. Is this correct?

Any other resources on this matter would be greatly appreciated.
Yes! Various languages and APIs often specify the precision you are guaranteed.  If the underlying hardware doesn't offer that precision, they must emulate it with extra work.  For instance, some machine instructions that compute transcendental function (sin, cos, exp, log, ...) only offer a limited accuracy. Library implementations that guarantee a certain accuracy must execute extra instructions to accomplish that by correcting the error and improving the approximation.

As a concrete example, consider the native_sin function in OpenCL.  The error is "implementation defined." On the other hand, the regular sin function promises a certain accuracy and implementation of OpenCL must make that happen regardless of the extra work.