\frac{1}{x + 1} - \frac{1}{x}\frac{-\left(1 - x\right)}{x} \cdot \frac{1}{\mathsf{fma}\left(-x, x, 1 \cdot 1\right)}double f(double x) {
double r21811 = 1.0;
double r21812 = x;
double r21813 = r21812 + r21811;
double r21814 = r21811 / r21813;
double r21815 = r21811 / r21812;
double r21816 = r21814 - r21815;
return r21816;
}
double f(double x) {
double r21817 = 1.0;
double r21818 = x;
double r21819 = r21817 - r21818;
double r21820 = -r21819;
double r21821 = r21820 / r21818;
double r21822 = -r21818;
double r21823 = r21817 * r21817;
double r21824 = fma(r21822, r21818, r21823);
double r21825 = r21817 / r21824;
double r21826 = r21821 * r21825;
return r21826;
}



Bits error versus x
Initial program 14.3
rmApplied frac-sub13.7
Simplified13.7
Taylor expanded around 0 0.3
rmApplied neg-sub00.3
Applied div-sub0.3
Simplified0.3
Simplified0.1
rmApplied *-un-lft-identity0.1
Applied flip-+0.4
Applied associate-/r/0.4
Applied times-frac0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019195 +o rules:numerics
(FPCore (x)
:name "2frac (problem 3.3.1)"
(- (/ 1.0 (+ x 1.0)) (/ 1.0 x)))