\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{-1}{x + 1}}{x}double f(double x) {
double r1126389 = 1.0;
double r1126390 = x;
double r1126391 = r1126390 + r1126389;
double r1126392 = r1126389 / r1126391;
double r1126393 = r1126389 / r1126390;
double r1126394 = r1126392 - r1126393;
return r1126394;
}
double f(double x) {
double r1126395 = -1.0;
double r1126396 = x;
double r1126397 = 1.0;
double r1126398 = r1126396 + r1126397;
double r1126399 = r1126395 / r1126398;
double r1126400 = r1126399 / r1126396;
return r1126400;
}



Bits error versus x
Results
Initial program 14.5
rmApplied frac-sub13.9
Simplified13.9
Taylor expanded around 0 0.3
rmApplied associate-/r*0.1
Final simplification0.1
herbie shell --seed 2019164 +o rules:numerics
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1 (+ x 1)) (/ 1 x)))