\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{-1}{1 + x}}{x}double f(double x) {
double r897074 = 1.0;
double r897075 = x;
double r897076 = r897075 + r897074;
double r897077 = r897074 / r897076;
double r897078 = r897074 / r897075;
double r897079 = r897077 - r897078;
return r897079;
}
double f(double x) {
double r897080 = -1.0;
double r897081 = 1.0;
double r897082 = x;
double r897083 = r897081 + r897082;
double r897084 = r897080 / r897083;
double r897085 = r897084 / r897082;
return r897085;
}



Bits error versus x
Results
Initial program 14.6
rmApplied frac-sub14.0
Simplified14.0
Simplified14.0
rmApplied associate-/r*14.0
Taylor expanded around -inf 0.1
Final simplification0.1
herbie shell --seed 2019128 +o rules:numerics
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1 (+ x 1)) (/ 1 x)))