\frac{1}{x + 1} - \frac{1}{x}-\frac{\frac{1}{1 + x}}{x}double f(double x) {
double r65121 = 1.0;
double r65122 = x;
double r65123 = r65122 + r65121;
double r65124 = r65121 / r65123;
double r65125 = r65121 / r65122;
double r65126 = r65124 - r65125;
return r65126;
}
double f(double x) {
double r65127 = 1.0;
double r65128 = x;
double r65129 = r65127 + r65128;
double r65130 = r65127 / r65129;
double r65131 = r65130 / r65128;
double r65132 = -r65131;
return r65132;
}



Bits error versus x
Results
Initial program 14.8
rmApplied frac-sub14.2
Simplified14.2
Taylor expanded around 0 0.4
rmApplied neg-sub00.4
Applied div-sub0.4
Simplified0.4
Simplified0.1
Final simplification0.1
herbie shell --seed 2019174 +o rules:numerics
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1.0 (+ x 1.0)) (/ 1.0 x)))