\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{-1}{x}}{x + 1}double f(double x) {
double r996109 = 1.0;
double r996110 = x;
double r996111 = r996110 + r996109;
double r996112 = r996109 / r996111;
double r996113 = r996109 / r996110;
double r996114 = r996112 - r996113;
return r996114;
}
double f(double x) {
double r996115 = -1.0;
double r996116 = x;
double r996117 = r996115 / r996116;
double r996118 = 1.0;
double r996119 = r996116 + r996118;
double r996120 = r996117 / r996119;
return r996120;
}



Bits error versus x
Results
Initial program 14.6
rmApplied frac-sub14.0
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 2019135
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1 (+ x 1)) (/ 1 x)))