\frac{1}{x + 1} - \frac{1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \leq -4125149662004715 \lor \neg \left(x \leq 114.8142218867796\right):\\
\;\;\;\;\left(\left(\frac{\frac{-2}{x}}{x} - \frac{2}{{x}^{4}}\right) - \frac{2}{{x}^{6}}\right) - \frac{2}{{x}^{8}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot x - 1} \cdot \left(\left(x - 1\right) - \left(x + 1\right)\right)\\
\end{array}(FPCore (x) :precision binary64 (- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))
(FPCore (x)
:precision binary64
(if (or (<= x -4125149662004715.0) (not (<= x 114.8142218867796)))
(-
(- (- (/ (/ -2.0 x) x) (/ 2.0 (pow x 4.0))) (/ 2.0 (pow x 6.0)))
(/ 2.0 (pow x 8.0)))
(* (/ 1.0 (- (* x x) 1.0)) (- (- x 1.0) (+ 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 <= -4125149662004715.0) || !(x <= 114.8142218867796)) {
tmp = ((((-2.0 / x) / x) - (2.0 / pow(x, 4.0))) - (2.0 / pow(x, 6.0))) - (2.0 / pow(x, 8.0));
} else {
tmp = (1.0 / ((x * x) - 1.0)) * ((x - 1.0) - (x + 1.0));
}
return tmp;
}



Bits error versus x
Results
if x < -4125149662004715 or 114.814221886779606 < x Initial program 28.3
Taylor expanded around inf 0.9
Simplified0.9
rmApplied associate-/r*_binary64_24090.1
if -4125149662004715 < x < 114.814221886779606Initial program 0.7
rmApplied flip--_binary64_24400.7
Applied associate-/r/_binary64_24110.7
Applied flip-+_binary64_24390.7
Applied associate-/r/_binary64_24110.7
Applied distribute-lft-out--_binary64_24170.0
Final simplification0.1
herbie shell --seed 2021015
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))