\frac{1}{x + 1} - \frac{1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \leq -1061679461205214.1 \lor \neg \left(x \leq 13871.13225992715\right):\\
\;\;\;\;\left(\frac{\frac{-2}{x}}{x} - \frac{2}{{x}^{4}}\right) - \frac{2}{{x}^{6}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \left(-2 - x\right)}{x \cdot x + -1}\\
\end{array}(FPCore (x) :precision binary64 (- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))
(FPCore (x) :precision binary64 (if (or (<= x -1061679461205214.1) (not (<= x 13871.13225992715))) (- (- (/ (/ -2.0 x) x) (/ 2.0 (pow x 4.0))) (/ 2.0 (pow x 6.0))) (/ (+ x (- -2.0 x)) (+ (* x x) -1.0))))
double code(double x) {
return (1.0 / (x + 1.0)) - (1.0 / (x - 1.0));
}
double code(double x) {
double tmp;
if ((x <= -1061679461205214.1) || !(x <= 13871.13225992715)) {
tmp = (((-2.0 / x) / x) - (2.0 / pow(x, 4.0))) - (2.0 / pow(x, 6.0));
} else {
tmp = (x + (-2.0 - x)) / ((x * x) + -1.0);
}
return tmp;
}



Bits error versus x
Results
if x < -1061679461205214.12 or 13871.1322599271498 < x Initial program 28.9
Taylor expanded around inf 0.7
Simplified0.7
rmApplied clear-num_binary64_38280.7
Simplified0.8
rmApplied associate-/r/_binary64_37750.7
Applied associate-/r*_binary64_37730.1
Simplified0.1
if -1061679461205214.12 < x < 13871.1322599271498Initial program 0.6
rmApplied frac-sub_binary64_38380.0
Simplified0.0
Simplified0.0
Final simplification0.1
herbie shell --seed 2021098
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))