\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -15302.0501740176169 \lor \neg \left(x \le 9800.36780144298791\right):\\
\;\;\;\;\frac{-1}{{x}^{2}} - 3 \cdot \left(\frac{1}{x} + \frac{1}{{x}^{3}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{x}{x + 1}\right)}^{3} - {\left(\frac{x + 1}{x - 1}\right)}^{3}}{\frac{x + 1}{x - 1} \cdot \left(\frac{x + 1}{x - 1} + \frac{x}{x + 1}\right) + \frac{x}{x + 1} \cdot \frac{x}{x + 1}}\\
\end{array}double code(double x) {
return ((x / (x + 1.0)) - ((x + 1.0) / (x - 1.0)));
}
double code(double x) {
double VAR;
if (((x <= -15302.050174017617) || !(x <= 9800.367801442988))) {
VAR = ((-1.0 / pow(x, 2.0)) - (3.0 * ((1.0 / x) + (1.0 / pow(x, 3.0)))));
} else {
VAR = ((pow((x / (x + 1.0)), 3.0) - pow(((x + 1.0) / (x - 1.0)), 3.0)) / ((((x + 1.0) / (x - 1.0)) * (((x + 1.0) / (x - 1.0)) + (x / (x + 1.0)))) + ((x / (x + 1.0)) * (x / (x + 1.0)))));
}
return VAR;
}



Bits error versus x
Results
if x < -15302.050174017617 or 9800.367801442988 < x Initial program 59.2
Taylor expanded around inf 0.3
Simplified0.3
if -15302.050174017617 < x < 9800.367801442988Initial program 0.1
rmApplied flip3--0.1
Simplified0.1
Final simplification0.2
herbie shell --seed 2020100
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))