\frac{1}{x + 1} - \frac{1}{x - 1}\frac{\frac{1}{x + 1} \cdot \left(-2\right)}{x - 1}double f(double x) {
double r116190 = 1.0;
double r116191 = x;
double r116192 = r116191 + r116190;
double r116193 = r116190 / r116192;
double r116194 = r116191 - r116190;
double r116195 = r116190 / r116194;
double r116196 = r116193 - r116195;
return r116196;
}
double f(double x) {
double r116197 = 1.0;
double r116198 = x;
double r116199 = r116198 + r116197;
double r116200 = r116197 / r116199;
double r116201 = 2.0;
double r116202 = -r116201;
double r116203 = r116200 * r116202;
double r116204 = r116198 - r116197;
double r116205 = r116203 / r116204;
return r116205;
}



Bits error versus x
Results
Initial program 14.2
rmApplied flip--28.9
Applied associate-/r/28.9
Applied flip-+14.3
Applied associate-/r/14.2
Applied distribute-lft-out--13.7
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 2020046
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1 (+ x 1)) (/ 1 (- x 1))))