\frac{1}{x + 1} - \frac{1}{x - 1}
\begin{array}{l}
t_0 := \frac{\frac{-2}{x}}{x} - \frac{2}{{x}^{4}}\\
\mathbf{if}\;x \leq -17920075928339632:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 8254.748494483338:\\
\;\;\;\;\frac{x - \left(x + 2\right)}{\mathsf{fma}\left(x, x, -1\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
(FPCore (x) :precision binary64 (- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))
(FPCore (x)
:precision binary64
(let* ((t_0 (- (/ (/ -2.0 x) x) (/ 2.0 (pow x 4.0)))))
(if (<= x -17920075928339632.0)
t_0
(if (<= x 8254.748494483338) (/ (- x (+ x 2.0)) (fma x x -1.0)) t_0))))double code(double x) {
return (1.0 / (x + 1.0)) - (1.0 / (x - 1.0));
}
double code(double x) {
double t_0 = ((-2.0 / x) / x) - (2.0 / pow(x, 4.0));
double tmp;
if (x <= -17920075928339632.0) {
tmp = t_0;
} else if (x <= 8254.748494483338) {
tmp = (x - (x + 2.0)) / fma(x, x, -1.0);
} else {
tmp = t_0;
}
return tmp;
}



Bits error versus x
if x < -17920075928339632 or 8254.7484944833377 < x Initial program 29.2
Taylor expanded in x around inf 0.8
Simplified0.8
Applied associate-/r*_binary640.1
if -17920075928339632 < x < 8254.7484944833377Initial program 0.7
Applied frac-sub_binary640.1
Simplified0.0
Simplified0.0
Final simplification0.1
herbie shell --seed 2022077
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))