\frac{x}{x + 1} - \frac{x + 1}{x - 1}\frac{-\left(3 + 1 \cdot \frac{1}{x}\right)}{\left(x + 1\right) \cdot \frac{x - 1}{x}}double code(double x) {
return ((double) (((double) (x / ((double) (x + 1.0)))) - ((double) (((double) (x + 1.0)) / ((double) (x - 1.0))))));
}
double code(double x) {
return ((double) (((double) -(((double) (3.0 + ((double) (1.0 * ((double) (1.0 / x)))))))) / ((double) (((double) (x + 1.0)) * ((double) (((double) (x - 1.0)) / x))))));
}



Bits error versus x
Results
Initial program 28.5
rmApplied clear-num28.5
Applied frac-sub28.2
Taylor expanded around 0 0.0
Simplified0.0
rmApplied div-inv0.1
Applied associate-*l*0.1
Simplified0.0
Final simplification0.0
herbie shell --seed 2020113 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))