\frac{x}{x + 1} - \frac{x + 1}{x - 1}\frac{\frac{-1 - x \cdot 3}{x + 1}}{-1 + x}(FPCore (x) :precision binary64 (- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))
(FPCore (x) :precision binary64 (/ (/ (- -1.0 (* x 3.0)) (+ 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 - (x * 3.0)) / (x + 1.0)) / (-1.0 + x);
}



Bits error versus x
Results
Initial program 29.2
rmApplied frac-sub_binary64_278230.3
Simplified30.3
Taylor expanded around 0 14.6
Simplified14.6
rmApplied difference-of-sqr--1_binary64_274414.6
Applied associate-/r*_binary64_27190.1
Final simplification0.1
herbie shell --seed 2020280
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))