For the function $f(x)=\sqrt{x^2+1}-x$, have computed $f(100)=0$ using 4-digit decimal arithmetic (rounding after every intermediate calculation). The value $f(100) = 0.0049998750$ (to 8sf) is given and I have computed a relative error of $1$ using this.
Next I am asked to arrange the computation of $f(x)$ so that the loss of significant digits can be reduced for large values of $x$. Hence compute a value for $f(100)$ using 4-digit decimal arithmetic with significantly smaller relative error than the value previously obtained.
I have tried using a series expansion and also writing $\sqrt{x^2+1}$ as $\sqrt{x(x+1/x)}$ but end up with either $f(100)=0$ again or a ridiculously large number.
Could anyone please help?