\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -9565.02695093550756 \lor \neg \left(x \le 9614.2427998710336\right):\\
\;\;\;\;\left(\frac{-1}{{x}^{2}} - \frac{3}{x}\right) - \frac{3}{{x}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{{x}^{3} + {1}^{3}} \cdot \left(x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)\right) - \log \left(e^{\frac{x + 1}{x - 1}}\right)\\
\end{array}double code(double x) {
return ((x / (x + 1.0)) - ((x + 1.0) / (x - 1.0)));
}
double code(double x) {
double temp;
if (((x <= -9565.026950935508) || !(x <= 9614.242799871034))) {
temp = (((-1.0 / pow(x, 2.0)) - (3.0 / x)) - (3.0 / pow(x, 3.0)));
} else {
temp = (((x / (pow(x, 3.0) + pow(1.0, 3.0))) * ((x * x) + ((1.0 * 1.0) - (x * 1.0)))) - log(exp(((x + 1.0) / (x - 1.0)))));
}
return temp;
}



Bits error versus x
Results
if x < -9565.026950935508 or 9614.242799871034 < x Initial program 59.3
Taylor expanded around inf 0.3
Simplified0.0
if -9565.026950935508 < x < 9614.242799871034Initial program 0.1
rmApplied add-log-exp0.1
rmApplied flip3-+0.1
Applied associate-/r/0.1
Final simplification0.1
herbie shell --seed 2020065
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))