\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -11573.705281839704:\\
\;\;\;\;\log \left(e^{\frac{-1}{x \cdot x}}\right) + \left(\frac{-3}{x} + \frac{-3}{\left(x \cdot x\right) \cdot x}\right)\\
\mathbf{elif}\;x \le 10678.074230429429:\\
\;\;\;\;\frac{x}{1 + x} - \frac{1}{x - 1} \cdot \left(1 + x\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{-1}{x \cdot x}}\right) + \left(\frac{-3}{x} + \frac{-3}{\left(x \cdot x\right) \cdot x}\right)\\
\end{array}double f(double x) {
double r1449889 = x;
double r1449890 = 1.0;
double r1449891 = r1449889 + r1449890;
double r1449892 = r1449889 / r1449891;
double r1449893 = r1449889 - r1449890;
double r1449894 = r1449891 / r1449893;
double r1449895 = r1449892 - r1449894;
return r1449895;
}
double f(double x) {
double r1449896 = x;
double r1449897 = -11573.705281839704;
bool r1449898 = r1449896 <= r1449897;
double r1449899 = -1.0;
double r1449900 = r1449896 * r1449896;
double r1449901 = r1449899 / r1449900;
double r1449902 = exp(r1449901);
double r1449903 = log(r1449902);
double r1449904 = -3.0;
double r1449905 = r1449904 / r1449896;
double r1449906 = r1449900 * r1449896;
double r1449907 = r1449904 / r1449906;
double r1449908 = r1449905 + r1449907;
double r1449909 = r1449903 + r1449908;
double r1449910 = 10678.074230429429;
bool r1449911 = r1449896 <= r1449910;
double r1449912 = 1.0;
double r1449913 = r1449912 + r1449896;
double r1449914 = r1449896 / r1449913;
double r1449915 = r1449896 - r1449912;
double r1449916 = r1449912 / r1449915;
double r1449917 = r1449916 * r1449913;
double r1449918 = r1449914 - r1449917;
double r1449919 = r1449911 ? r1449918 : r1449909;
double r1449920 = r1449898 ? r1449909 : r1449919;
return r1449920;
}



Bits error versus x
Results
if x < -11573.705281839704 or 10678.074230429429 < x Initial program 59.2
Taylor expanded around inf 0.3
Simplified0.0
rmApplied add-log-exp0.5
if -11573.705281839704 < x < 10678.074230429429Initial program 0.1
rmApplied flip--0.1
Applied associate-/r/0.1
rmApplied difference-of-squares0.1
Applied associate-/r*0.1
Simplified0.1
Final simplification0.3
herbie shell --seed 2019156
(FPCore (x)
:name "Asymptote C"
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))