(FPCore (x) :precision binary64 (- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))
(FPCore (x)
:precision binary64
(let* ((t_0
(+
(* -2.0 (pow x -2.0))
(- (/ -2.0 (pow x 6.0)) (/ 2.0 (pow x 4.0))))))
(if (<= x -220.90960044263244)
t_0
(if (<= x 218.49470597842105)
(+
(/ 1.0 (+ x 1.0))
(* (fma x x (+ x 1.0)) (/ -1.0 (+ (pow x 3.0) -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 * pow(x, -2.0)) + ((-2.0 / pow(x, 6.0)) - (2.0 / pow(x, 4.0)));
double tmp;
if (x <= -220.90960044263244) {
tmp = t_0;
} else if (x <= 218.49470597842105) {
tmp = (1.0 / (x + 1.0)) + (fma(x, x, (x + 1.0)) * (-1.0 / (pow(x, 3.0) + -1.0)));
} else {
tmp = t_0;
}
return tmp;
}
function code(x) return Float64(Float64(1.0 / Float64(x + 1.0)) - Float64(1.0 / Float64(x - 1.0))) end
function code(x) t_0 = Float64(Float64(-2.0 * (x ^ -2.0)) + Float64(Float64(-2.0 / (x ^ 6.0)) - Float64(2.0 / (x ^ 4.0)))) tmp = 0.0 if (x <= -220.90960044263244) tmp = t_0; elseif (x <= 218.49470597842105) tmp = Float64(Float64(1.0 / Float64(x + 1.0)) + Float64(fma(x, x, Float64(x + 1.0)) * Float64(-1.0 / Float64((x ^ 3.0) + -1.0)))); else tmp = t_0; end return tmp end
code[x_] := N[(N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(x - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_] := Block[{t$95$0 = N[(N[(-2.0 * N[Power[x, -2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-2.0 / N[Power[x, 6.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / N[Power[x, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -220.90960044263244], t$95$0, If[LessEqual[x, 218.49470597842105], N[(N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / N[(N[Power[x, 3.0], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\frac{1}{x + 1} - \frac{1}{x - 1}
\begin{array}{l}
t_0 := -2 \cdot {x}^{-2} + \left(\frac{-2}{{x}^{6}} - \frac{2}{{x}^{4}}\right)\\
\mathbf{if}\;x \leq -220.90960044263244:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 218.49470597842105:\\
\;\;\;\;\frac{1}{x + 1} + \mathsf{fma}\left(x, x, x + 1\right) \cdot \frac{-1}{{x}^{3} + -1}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}



Bits error versus x
if x < -220.90960044263244 or 218.49470597842105 < x Initial program 29.4
Taylor expanded in x around inf 0.8
Simplified0.8
Applied egg-rr0.0
if -220.90960044263244 < x < 218.49470597842105Initial program 0.0
Applied egg-rr0.0
Final simplification0.0
herbie shell --seed 2022153
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))