\frac{1}{x + 1} - \frac{1}{x - 1}\frac{\frac{1}{x + 1} \cdot \left(-2\right)}{x - 1}double f(double x) {
double r79604 = 1.0;
double r79605 = x;
double r79606 = r79605 + r79604;
double r79607 = r79604 / r79606;
double r79608 = r79605 - r79604;
double r79609 = r79604 / r79608;
double r79610 = r79607 - r79609;
return r79610;
}
double f(double x) {
double r79611 = 1.0;
double r79612 = x;
double r79613 = r79612 + r79611;
double r79614 = r79611 / r79613;
double r79615 = 2.0;
double r79616 = -r79615;
double r79617 = r79614 * r79616;
double r79618 = r79612 - r79611;
double r79619 = r79617 / r79618;
return r79619;
}



Bits error versus x
Results
Initial program 14.5
rmApplied flip--29.4
Applied associate-/r/29.4
Applied flip-+14.6
Applied associate-/r/14.5
Applied distribute-lft-out--13.9
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 2019209 +o rules:numerics
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1 (+ x 1)) (/ 1 (- x 1))))