\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -11235.7395424927436 \lor \neg \left(x \le 8706.16731299591083\right):\\
\;\;\;\;\left(\frac{-1}{{x}^{2}} - \frac{3}{x}\right) - \frac{3}{{x}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{x \cdot x - 1 \cdot 1}, x - 1, -\frac{x + 1}{x - 1}\right)\\
\end{array}double f(double x) {
double r158597 = x;
double r158598 = 1.0;
double r158599 = r158597 + r158598;
double r158600 = r158597 / r158599;
double r158601 = r158597 - r158598;
double r158602 = r158599 / r158601;
double r158603 = r158600 - r158602;
return r158603;
}
double f(double x) {
double r158604 = x;
double r158605 = -11235.739542492744;
bool r158606 = r158604 <= r158605;
double r158607 = 8706.16731299591;
bool r158608 = r158604 <= r158607;
double r158609 = !r158608;
bool r158610 = r158606 || r158609;
double r158611 = 1.0;
double r158612 = -r158611;
double r158613 = 2.0;
double r158614 = pow(r158604, r158613);
double r158615 = r158612 / r158614;
double r158616 = 3.0;
double r158617 = r158616 / r158604;
double r158618 = r158615 - r158617;
double r158619 = 3.0;
double r158620 = pow(r158604, r158619);
double r158621 = r158616 / r158620;
double r158622 = r158618 - r158621;
double r158623 = r158604 * r158604;
double r158624 = r158611 * r158611;
double r158625 = r158623 - r158624;
double r158626 = r158604 / r158625;
double r158627 = r158604 - r158611;
double r158628 = r158604 + r158611;
double r158629 = r158628 / r158627;
double r158630 = -r158629;
double r158631 = fma(r158626, r158627, r158630);
double r158632 = r158610 ? r158622 : r158631;
return r158632;
}



Bits error versus x
if x < -11235.739542492744 or 8706.16731299591 < x Initial program 59.2
rmApplied flip-+60.4
Applied associate-/r/60.4
Applied fma-neg60.2
Taylor expanded around inf 0.3
Simplified0.0
if -11235.739542492744 < x < 8706.16731299591Initial program 0.1
rmApplied flip-+0.1
Applied associate-/r/0.1
Applied fma-neg0.1
Final simplification0.1
herbie shell --seed 2020020 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))