\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -41855320.478344962 \lor \neg \left(x \le 125882.075579238954\right):\\
\;\;\;\;\left(-\mathsf{fma}\left(1, \frac{1}{{x}^{2}}, \frac{3}{x}\right)\right) + \left(-\frac{3}{{x}^{3}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, 2, 1 - 3 \cdot {x}^{2}\right)}{\left(x + 1\right) \cdot \mathsf{fma}\left(x, x, 1 - 2 \cdot x\right)}\\
\end{array}double f(double x) {
double r89709 = x;
double r89710 = 1.0;
double r89711 = r89709 + r89710;
double r89712 = r89709 / r89711;
double r89713 = r89709 - r89710;
double r89714 = r89711 / r89713;
double r89715 = r89712 - r89714;
return r89715;
}
double f(double x) {
double r89716 = x;
double r89717 = -41855320.47834496;
bool r89718 = r89716 <= r89717;
double r89719 = 125882.07557923895;
bool r89720 = r89716 <= r89719;
double r89721 = !r89720;
bool r89722 = r89718 || r89721;
double r89723 = 1.0;
double r89724 = 1.0;
double r89725 = 2.0;
double r89726 = pow(r89716, r89725);
double r89727 = r89724 / r89726;
double r89728 = 3.0;
double r89729 = r89728 / r89716;
double r89730 = fma(r89723, r89727, r89729);
double r89731 = -r89730;
double r89732 = 3.0;
double r89733 = pow(r89716, r89732);
double r89734 = r89728 / r89733;
double r89735 = -r89734;
double r89736 = r89731 + r89735;
double r89737 = 2.0;
double r89738 = r89728 * r89726;
double r89739 = r89723 - r89738;
double r89740 = fma(r89716, r89737, r89739);
double r89741 = r89716 + r89723;
double r89742 = r89737 * r89716;
double r89743 = r89723 - r89742;
double r89744 = fma(r89716, r89716, r89743);
double r89745 = r89741 * r89744;
double r89746 = r89740 / r89745;
double r89747 = r89722 ? r89736 : r89746;
return r89747;
}



Bits error versus x
if x < -41855320.47834496 or 125882.07557923895 < x Initial program 59.6
rmApplied div-inv59.8
rmApplied flip-+61.9
Applied frac-times61.9
Applied frac-sub62.4
Simplified62.1
Taylor expanded around 0 43.6
Simplified43.6
Taylor expanded around inf 0.3
Simplified0.0
if -41855320.47834496 < x < 125882.07557923895Initial program 0.2
rmApplied div-inv0.2
rmApplied flip-+0.2
Applied frac-times0.2
Applied frac-sub0.2
Simplified0.2
Taylor expanded around 0 0.1
Simplified0.1
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020039 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))