\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{-1}{x}}{1 + x}double f(double x) {
double r3453523 = 1.0;
double r3453524 = x;
double r3453525 = r3453524 + r3453523;
double r3453526 = r3453523 / r3453525;
double r3453527 = r3453523 / r3453524;
double r3453528 = r3453526 - r3453527;
return r3453528;
}
double f(double x) {
double r3453529 = -1.0;
double r3453530 = x;
double r3453531 = r3453529 / r3453530;
double r3453532 = 1.0;
double r3453533 = r3453532 + r3453530;
double r3453534 = r3453531 / r3453533;
return r3453534;
}



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