\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \leq -29075.666064525398:\\
\;\;\;\;\frac{\frac{-5}{x \cdot x} - \left(\frac{6}{x} + \frac{16}{{x}^{3}}\right)}{\frac{x}{x + 1} + \frac{x + 1}{x + -1}}\\
\mathbf{elif}\;x \leq 1630.155029845001:\\
\;\;\;\;\frac{x}{x + 1} - \sqrt[3]{{\left(\frac{x + 1}{x + -1}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{-3}{x} - \frac{1}{x \cdot x}\right) - \left(\frac{3}{{x}^{3}} + \frac{1}{{x}^{4}}\right)\\
\end{array}(FPCore (x) :precision binary64 (- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))
(FPCore (x)
:precision binary64
(if (<= x -29075.666064525398)
(/
(- (/ -5.0 (* x x)) (+ (/ 6.0 x) (/ 16.0 (pow x 3.0))))
(+ (/ x (+ x 1.0)) (/ (+ x 1.0) (+ x -1.0))))
(if (<= x 1630.155029845001)
(- (/ x (+ x 1.0)) (cbrt (pow (/ (+ x 1.0) (+ x -1.0)) 3.0)))
(-
(- (/ -3.0 x) (/ 1.0 (* x x)))
(+ (/ 3.0 (pow x 3.0)) (/ 1.0 (pow x 4.0)))))))double code(double x) {
return (x / (x + 1.0)) - ((x + 1.0) / (x - 1.0));
}
double code(double x) {
double tmp;
if (x <= -29075.666064525398) {
tmp = ((-5.0 / (x * x)) - ((6.0 / x) + (16.0 / pow(x, 3.0)))) / ((x / (x + 1.0)) + ((x + 1.0) / (x + -1.0)));
} else if (x <= 1630.155029845001) {
tmp = (x / (x + 1.0)) - cbrt(pow(((x + 1.0) / (x + -1.0)), 3.0));
} else {
tmp = ((-3.0 / x) - (1.0 / (x * x))) - ((3.0 / pow(x, 3.0)) + (1.0 / pow(x, 4.0)));
}
return tmp;
}



Bits error versus x
Results
if x < -29075.6660645253978Initial program 59.3
rmApplied flip--_binary64_278159.3
Simplified59.3
Simplified59.3
Taylor expanded around inf 0.3
Simplified0.0
if -29075.6660645253978 < x < 1630.1550298450011Initial program 0.1
rmApplied add-cbrt-cube_binary64_28420.1
Simplified0.1
if 1630.1550298450011 < x Initial program 59.1
Taylor expanded around inf 0.3
Simplified0.0
Final simplification0.1
herbie shell --seed 2021013
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))