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



Bits error versus x
Results
if x < -9097.7626574196402 or 13483.542986370416 < x Initial program 59.4
Taylor expanded around inf 0.3
Simplified0.3
rmApplied distribute-lft-in0.3
Simplified0.3
Simplified0.0
if -9097.7626574196402 < x < 13483.542986370416Initial program 0.1
rmApplied flip3--0.1
Applied associate-/r/0.1
Final simplification0.1
herbie shell --seed 2020196
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))