\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{-1}{x}}{x + 1}double f(double x) {
double r5576596 = 1.0;
double r5576597 = x;
double r5576598 = r5576597 + r5576596;
double r5576599 = r5576596 / r5576598;
double r5576600 = r5576596 / r5576597;
double r5576601 = r5576599 - r5576600;
return r5576601;
}
double f(double x) {
double r5576602 = -1.0;
double r5576603 = x;
double r5576604 = r5576602 / r5576603;
double r5576605 = 1.0;
double r5576606 = r5576603 + r5576605;
double r5576607 = r5576604 / r5576606;
return r5576607;
}



Bits error versus x
Results
Initial program 14.5
rmApplied frac-sub13.8
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 2019107
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1 (+ x 1)) (/ 1 x)))