\frac{1}{x + 1} - \frac{1}{x - 1}\frac{\frac{1}{x + 1} \cdot \left(-2\right)}{x - 1}double f(double x) {
double r221339 = 1.0;
double r221340 = x;
double r221341 = r221340 + r221339;
double r221342 = r221339 / r221341;
double r221343 = r221340 - r221339;
double r221344 = r221339 / r221343;
double r221345 = r221342 - r221344;
return r221345;
}
double f(double x) {
double r221346 = 1.0;
double r221347 = x;
double r221348 = r221347 + r221346;
double r221349 = r221346 / r221348;
double r221350 = 2.0;
double r221351 = -r221350;
double r221352 = r221349 * r221351;
double r221353 = r221347 - r221346;
double r221354 = r221352 / r221353;
return r221354;
}



Bits error versus x
Results
Initial program 15.0
rmApplied flip--29.0
Applied associate-/r/29.0
Applied flip-+15.1
Applied associate-/r/15.0
Applied distribute-lft-out--14.3
Taylor expanded around 0 0.4
rmApplied difference-of-squares0.4
Applied associate-/r*0.1
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2020045
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1 (+ x 1)) (/ 1 (- x 1))))