Im trying to understand FPA. Taking an example, suppose
$$ f(x) = \frac{ 1 }{1-x} - \frac{1}{1+x} $$
$x \neq \pm 1$. So, to compute this expression, we are using 2 divisions and one substraction, thus giving 3 operation. Are there values for which it is dificult to compute such expression in floating point arithmetic? I would guess for values near the restrictions. Is this correct?
A difficulty (but perhaps not the only) arises near $x = 0$. For example, analytically, $f = g$ where
$$ g(x) = \frac{2x}{1 - x^2} $$
but as $x \to 0$, $1 \pm x \approx 1$ and $1 - x^2 \approx 1$, both because the mantissa precision is limited, so $f(x) \approx 0$ but $g(x) \approx 2 x$. Clearly, analytically $f(x)\neq0$ for $x \neq 0$, so rearranging the formula symbolically before evaluation as $g(x)$ gives a more accurate result.
Note: Here I am using $\approx$ to denote floating point equality, not an approximate equality.