\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \leq -29361.18241715501:\\
\;\;\;\;\frac{-\left(\frac{12}{x \cdot x} + \left(\frac{9}{x} + \frac{48}{{x}^{3}}\right)\right)}{\frac{x}{x + 1} \cdot \frac{x}{x + 1} + \frac{x + \left(x + 1\right) \cdot \frac{x + 1}{x - 1}}{x - 1}}\\
\mathbf{elif}\;x \leq 14875.083937536368:\\
\;\;\;\;\frac{x}{x + 1} - \frac{x + 1}{{x}^{3} - {1}^{3}} \cdot \left(x \cdot x + \left(1 \cdot 1 + x \cdot 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{x} \cdot \left(\frac{1}{x} + 3\right) - \frac{3}{{x}^{3}}\\
\end{array}(FPCore (x) :precision binary64 (- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))
(FPCore (x)
:precision binary64
(if (<= x -29361.18241715501)
(/
(- (+ (/ 12.0 (* x x)) (+ (/ 9.0 x) (/ 48.0 (pow x 3.0)))))
(+
(* (/ x (+ x 1.0)) (/ x (+ x 1.0)))
(/ (+ x (* (+ x 1.0) (/ (+ x 1.0) (- x 1.0)))) (- x 1.0))))
(if (<= x 14875.083937536368)
(-
(/ x (+ x 1.0))
(*
(/ (+ x 1.0) (- (pow x 3.0) (pow 1.0 3.0)))
(+ (* x x) (+ (* 1.0 1.0) (* x 1.0)))))
(- (* (/ -1.0 x) (+ (/ 1.0 x) 3.0)) (/ 3.0 (pow x 3.0))))))double code(double x) {
return ((double) ((x / ((double) (x + 1.0))) - (((double) (x + 1.0)) / ((double) (x - 1.0)))));
}
double code(double x) {
double tmp;
if ((x <= -29361.18241715501)) {
tmp = (((double) -(((double) ((12.0 / ((double) (x * x))) + ((double) ((9.0 / x) + (48.0 / ((double) pow(x, 3.0))))))))) / ((double) (((double) ((x / ((double) (x + 1.0))) * (x / ((double) (x + 1.0))))) + (((double) (x + ((double) (((double) (x + 1.0)) * (((double) (x + 1.0)) / ((double) (x - 1.0))))))) / ((double) (x - 1.0))))));
} else {
double tmp_1;
if ((x <= 14875.083937536368)) {
tmp_1 = ((double) ((x / ((double) (x + 1.0))) - ((double) ((((double) (x + 1.0)) / ((double) (((double) pow(x, 3.0)) - ((double) pow(1.0, 3.0))))) * ((double) (((double) (x * x)) + ((double) (((double) (1.0 * 1.0)) + ((double) (x * 1.0))))))))));
} else {
tmp_1 = ((double) (((double) ((-1.0 / x) * ((double) ((1.0 / x) + 3.0)))) - (3.0 / ((double) pow(x, 3.0)))));
}
tmp = tmp_1;
}
return tmp;
}



Bits error versus x
Results
if x < -29361.18241715501Initial program 59.4
rmApplied flip3--_binary6459.4
Simplified59.4
Taylor expanded around inf 0.5
Simplified0.4
if -29361.18241715501 < x < 14875.083937536368Initial program 0.1
rmApplied flip3--_binary640.1
Applied associate-/r/_binary640.1
if 14875.083937536368 < x Initial program 59.3
Taylor expanded around inf 0.3
Simplified0.3
Final simplification0.2
herbie shell --seed 2020204
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))