\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{-1}{x}}{x + 1}double f(double x) {
double r1570977 = 1.0;
double r1570978 = x;
double r1570979 = r1570978 + r1570977;
double r1570980 = r1570977 / r1570979;
double r1570981 = r1570977 / r1570978;
double r1570982 = r1570980 - r1570981;
return r1570982;
}
double f(double x) {
double r1570983 = -1.0;
double r1570984 = x;
double r1570985 = r1570983 / r1570984;
double r1570986 = 1.0;
double r1570987 = r1570984 + r1570986;
double r1570988 = r1570985 / r1570987;
return r1570988;
}



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