I was reading Scientific Computing, An Introductory Survey, by Michael Heath. In the Example 1.11, he made a Finite Difference Aproximation, with the usual approximation : $f’(x)\neq \frac{f(x+h)-f(x)}{h}$. He postules the following:
We want $h$ to be small so that the approximation will be accurate, but if h is too small, then $\textrm{fl}(x + h)$ may not differ from $\textrm{fl}(x)$. Even if $\textrm{fl}(x + h)\neq \textrm{fl}(x)$, we might still have $\textrm{fl}(f(x + h)) = \textrm{fl}(f(x))$ if $f$ is slowly varying. In any case, we can expect some cancellation in computing the difference $f (x + h) − f (x).$ Thus, there is a trade-off between truncation error and rounding error in choosing the size of h. If the relative error in the function values is bounded by ε, then the rounding error in the approximate derivative value is bounded by $2ε|f(x)|/h$. The Taylor series expansion $$f (x + h) = f (x) + f ′ (x)h + f ′′ (x)\frac{h^2}{2} + · · ·$$ gives an estimate of $M h/2$ for the truncation error, where M is a bound for $|f′′(x)|.$
I would like to know how could he get the rounding error, I can’t get the result he is giving. Any idea would be great