\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \leq -23307.635529317067:\\
\;\;\;\;\frac{\frac{-12}{x \cdot x} - \left(\frac{9}{x} + \frac{48}{{x}^{3}}\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 13029.469918336774:\\
\;\;\;\;\frac{\log \left(e^{{\left(\frac{x}{x + 1}\right)}^{3} - {\left(\frac{x + 1}{x - 1}\right)}^{3}}\right)}{\frac{x + \left(x + 1\right) \cdot \frac{x + 1}{x - 1}}{x - 1} + {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + 1}}\right)}^{4} \cdot \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + 1}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{x + 1}}\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 -23307.635529317067)
(/
(- (/ (- 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 13029.469918336774)
(/
(log
(exp (- (pow (/ x (+ x 1.0)) 3.0) (pow (/ (+ x 1.0) (- x 1.0)) 3.0))))
(+
(/ (+ x (* (+ x 1.0) (/ (+ x 1.0) (- x 1.0)))) (- x 1.0))
(*
(pow (/ (cbrt x) (cbrt (+ x 1.0))) 4.0)
(* (/ (cbrt x) (cbrt (+ x 1.0))) (/ (cbrt x) (cbrt (+ 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 <= -23307.635529317067)) {
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 <= 13029.469918336774)) {
tmp_1 = (((double) log(((double) exp(((double) (((double) pow((x / ((double) (x + 1.0))), 3.0)) - ((double) pow((((double) (x + 1.0)) / ((double) (x - 1.0))), 3.0)))))))) / ((double) ((((double) (x + ((double) (((double) (x + 1.0)) * (((double) (x + 1.0)) / ((double) (x - 1.0))))))) / ((double) (x - 1.0))) + ((double) (((double) pow((((double) cbrt(x)) / ((double) cbrt(((double) (x + 1.0))))), 4.0)) * ((double) ((((double) cbrt(x)) / ((double) cbrt(((double) (x + 1.0))))) * (((double) cbrt(x)) / ((double) cbrt(((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 < -23307.6355293170673Initial program Error: 59.4 bits
rmApplied flip3--Error: 59.4 bits
SimplifiedError: 59.4 bits
Taylor expanded around inf Error: 0.5 bits
SimplifiedError: 0.4 bits
if -23307.6355293170673 < x < 13029.469918336774Initial program Error: 0.1 bits
rmApplied flip3--Error: 0.1 bits
SimplifiedError: 0.1 bits
rmApplied add-cube-cbrtError: 0.1 bits
Applied add-cube-cbrtError: 0.1 bits
Applied times-fracError: 0.1 bits
Applied add-cube-cbrtError: 0.1 bits
Applied add-cube-cbrtError: 0.1 bits
Applied times-fracError: 0.1 bits
Applied swap-sqrError: 0.1 bits
SimplifiedError: 0.1 bits
rmApplied add-log-expError: 0.1 bits
Applied add-log-expError: 0.2 bits
Applied diff-logError: 0.2 bits
SimplifiedError: 0.2 bits
if 13029.469918336774 < x Initial program Error: 59.3 bits
Taylor expanded around inf Error: 0.3 bits
SimplifiedError: 0.3 bits
Final simplificationError: 0.3 bits
herbie shell --seed 2020204
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))