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



Bits error versus x
Results
if x < -2.473895295753532e74 or 130107.61295780109 < x Initial program 59.8
rmApplied add-cbrt-cube61.2
Applied add-cbrt-cube62.9
Applied cbrt-undiv62.9
Simplified59.8
Taylor expanded around inf 0.3
Simplified0.0
if -2.473895295753532e74 < x < 130107.61295780109Initial program 5.5
rmApplied frac-sub5.5
Simplified5.5
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020184
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))