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) > f_t(y)$ where $f_t$ denotes the true value of $f$ and $f_a(x)<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) > g_t(y)$ implies that $g_a(x) > g_a(y)$. Is this correct?
Any other resources on this matter would be greatly appreciated.