\frac{1}{x + 1} - \frac{1}{x - 1}\frac{\frac{1}{x + 1}}{x - 1} \cdot \left(-2\right)double f(double x) {
double r116570 = 1.0;
double r116571 = x;
double r116572 = r116571 + r116570;
double r116573 = r116570 / r116572;
double r116574 = r116571 - r116570;
double r116575 = r116570 / r116574;
double r116576 = r116573 - r116575;
return r116576;
}
double f(double x) {
double r116577 = 1.0;
double r116578 = x;
double r116579 = r116578 + r116577;
double r116580 = r116577 / r116579;
double r116581 = r116578 - r116577;
double r116582 = r116580 / r116581;
double r116583 = 2.0;
double r116584 = -r116583;
double r116585 = r116582 * r116584;
return r116585;
}



Bits error versus x
Results
Initial program 14.1
rmApplied flip--28.8
Applied associate-/r/28.9
Applied flip-+14.2
Applied associate-/r/14.1
Applied distribute-lft-out--13.5
Taylor expanded around 0 0.4
rmApplied difference-of-squares0.4
Applied associate-/r*0.1
Final simplification0.1
herbie shell --seed 2020020
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1 (+ x 1)) (/ 1 (- x 1))))