\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -11906.396240974655:\\
\;\;\;\;-\left(\frac{1}{x \cdot x} + \mathsf{fma}\left(\frac{3}{x}, \frac{1}{x \cdot x}, \frac{3}{x}\right)\right)\\
\mathbf{elif}\;x \le 10135.341772312217:\\
\;\;\;\;\log \left(e^{\frac{x}{1 + x} - \frac{1 + x}{-1 + x}}\right)\\
\mathbf{else}:\\
\;\;\;\;-\left(\frac{1}{x \cdot x} + \mathsf{fma}\left(\frac{3}{x}, \frac{1}{x \cdot x}, \frac{3}{x}\right)\right)\\
\end{array}double f(double x) {
double r5319732 = x;
double r5319733 = 1.0;
double r5319734 = r5319732 + r5319733;
double r5319735 = r5319732 / r5319734;
double r5319736 = r5319732 - r5319733;
double r5319737 = r5319734 / r5319736;
double r5319738 = r5319735 - r5319737;
return r5319738;
}
double f(double x) {
double r5319739 = x;
double r5319740 = -11906.396240974655;
bool r5319741 = r5319739 <= r5319740;
double r5319742 = 1.0;
double r5319743 = r5319739 * r5319739;
double r5319744 = r5319742 / r5319743;
double r5319745 = 3.0;
double r5319746 = r5319745 / r5319739;
double r5319747 = fma(r5319746, r5319744, r5319746);
double r5319748 = r5319744 + r5319747;
double r5319749 = -r5319748;
double r5319750 = 10135.341772312217;
bool r5319751 = r5319739 <= r5319750;
double r5319752 = r5319742 + r5319739;
double r5319753 = r5319739 / r5319752;
double r5319754 = -1.0;
double r5319755 = r5319754 + r5319739;
double r5319756 = r5319752 / r5319755;
double r5319757 = r5319753 - r5319756;
double r5319758 = exp(r5319757);
double r5319759 = log(r5319758);
double r5319760 = r5319751 ? r5319759 : r5319749;
double r5319761 = r5319741 ? r5319749 : r5319760;
return r5319761;
}



Bits error versus x
if x < -11906.396240974655 or 10135.341772312217 < x Initial program 59.2
rmApplied div-inv59.4
Applied fma-neg60.1
rmApplied add-log-exp59.4
Simplified59.2
Taylor expanded around inf 0.3
Simplified0.0
if -11906.396240974655 < x < 10135.341772312217Initial program 0.1
rmApplied div-inv0.1
Applied fma-neg0.1
rmApplied add-log-exp0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019158 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))