\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{1}{-1 - x}}{x}double f(double x) {
double r764316 = 1.0;
double r764317 = x;
double r764318 = r764317 + r764316;
double r764319 = r764316 / r764318;
double r764320 = r764316 / r764317;
double r764321 = r764319 - r764320;
return r764321;
}
double f(double x) {
double r764322 = 1.0;
double r764323 = -1.0;
double r764324 = x;
double r764325 = r764323 - r764324;
double r764326 = r764322 / r764325;
double r764327 = r764326 / r764324;
return r764327;
}



Bits error versus x
Results
Initial program 14.6
rmApplied frac-sub13.9
Simplified13.9
Simplified13.9
rmApplied frac-2neg13.9
Simplified0.4
Simplified0.4
rmApplied associate-/r*0.1
Final simplification0.1
herbie shell --seed 2019152 +o rules:numerics
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1 (+ x 1)) (/ 1 x)))