\frac{x}{x + 1} - \frac{x + 1}{x - 1}\frac{\frac{-1 - 3 \cdot x}{x + 1}}{-1 + x}(FPCore (x) :precision binary64 (- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))
(FPCore (x) :precision binary64 (/ (/ (- -1.0 (* 3.0 x)) (+ x 1.0)) (+ -1.0 x)))
double code(double x) {
return (x / (x + 1.0)) - ((x + 1.0) / (x - 1.0));
}
double code(double x) {
return ((-1.0 - (3.0 * x)) / (x + 1.0)) / (-1.0 + x);
}



Bits error versus x
Results
Initial program 29.5
rmApplied frac-sub_binary6430.6
Simplified30.6
Simplified30.6
Taylor expanded around 0 15.3
Simplified15.3
rmApplied difference-of-sqr--1_binary6415.3
Applied associate-/r*_binary640.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2021173
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))