\frac{1}{x + 1} - \frac{1}{x}1 \cdot \frac{\frac{-1}{x + 1}}{x}double f(double x) {
double r60786 = 1.0;
double r60787 = x;
double r60788 = r60787 + r60786;
double r60789 = r60786 / r60788;
double r60790 = r60786 / r60787;
double r60791 = r60789 - r60790;
return r60791;
}
double f(double x) {
double r60792 = 1.0;
double r60793 = -1.0;
double r60794 = x;
double r60795 = r60794 + r60792;
double r60796 = r60793 / r60795;
double r60797 = r60796 / r60794;
double r60798 = r60792 * r60797;
return r60798;
}



Bits error versus x
Results
Initial program 14.8
rmApplied frac-sub14.2
Simplified14.2
Taylor expanded around 0 0.3
rmApplied div-inv0.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2019194 +o rules:numerics
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1.0 (+ x 1.0)) (/ 1.0 x)))