\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{-1}{x}}{x + 1}double f(double x) {
double r1467626 = 1.0;
double r1467627 = x;
double r1467628 = r1467627 + r1467626;
double r1467629 = r1467626 / r1467628;
double r1467630 = r1467626 / r1467627;
double r1467631 = r1467629 - r1467630;
return r1467631;
}
double f(double x) {
double r1467632 = -1.0;
double r1467633 = x;
double r1467634 = r1467632 / r1467633;
double r1467635 = 1.0;
double r1467636 = r1467633 + r1467635;
double r1467637 = r1467634 / r1467636;
return r1467637;
}



Bits error versus x
Results
Initial program 14.4
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 2019141
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1 (+ x 1)) (/ 1 x)))