\frac{1}{x + 1} - \frac{1}{x - 1}\frac{\frac{2}{1 + x}}{1 - x}(FPCore (x) :precision binary64 (- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))
(FPCore (x) :precision binary64 (/ (/ 2.0 (+ 1.0 x)) (- 1.0 x)))
double code(double x) {
return (1.0 / (x + 1.0)) - (1.0 / (x - 1.0));
}
double code(double x) {
return (2.0 / (1.0 + x)) / (1.0 - x);
}



Bits error versus x
Results
Initial program 14.6
rmApplied frac-sub_binary64_486114.0
Simplified14.0
Simplified13.9
rmApplied frac-2neg_binary64_486313.9
Simplified0.4
Simplified0.4
rmApplied *-un-lft-identity_binary64_48520.4
Applied difference-of-squares_binary64_48210.4
Applied associate-/r*_binary64_47960.1
Final simplification0.1
herbie shell --seed 2020353
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))