\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.0
rmApplied frac-sub_binary6430.1
Simplified30.1
Simplified30.1
Taylor expanded around 0 14.9
Simplified14.9
rmApplied difference-of-sqr--1_binary6414.9
Applied associate-/r*_binary640.1
Final simplification0.1
herbie shell --seed 2021175
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))