\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{-1}{x}}{x + 1}double f(double x) {
double r1086010 = 1.0;
double r1086011 = x;
double r1086012 = r1086011 + r1086010;
double r1086013 = r1086010 / r1086012;
double r1086014 = r1086010 / r1086011;
double r1086015 = r1086013 - r1086014;
return r1086015;
}
double f(double x) {
double r1086016 = -1.0;
double r1086017 = x;
double r1086018 = r1086016 / r1086017;
double r1086019 = 1.0;
double r1086020 = r1086017 + r1086019;
double r1086021 = r1086018 / r1086020;
return r1086021;
}



Bits error versus x
Results
Initial program 14.4
rmApplied frac-sub13.7
Simplified0.4
Simplified0.4
rmApplied *-un-lft-identity0.4
Applied distribute-rgt-out0.4
Applied associate-/r*0.1
Final simplification0.1
herbie shell --seed 2019138
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1 (+ x 1)) (/ 1 x)))