\frac{x}{x + 1} - \frac{x + 1}{x - 1}\frac{\frac{-\left(3 \cdot x + 1\right)}{x + 1}}{x - 1}double f(double x) {
double r86611 = x;
double r86612 = 1.0;
double r86613 = r86611 + r86612;
double r86614 = r86611 / r86613;
double r86615 = r86611 - r86612;
double r86616 = r86613 / r86615;
double r86617 = r86614 - r86616;
return r86617;
}
double f(double x) {
double r86618 = 3.0;
double r86619 = x;
double r86620 = r86618 * r86619;
double r86621 = 1.0;
double r86622 = r86620 + r86621;
double r86623 = -r86622;
double r86624 = r86619 + r86621;
double r86625 = r86623 / r86624;
double r86626 = r86619 - r86621;
double r86627 = r86625 / r86626;
return r86627;
}



Bits error versus x
Results
Initial program 29.7
rmApplied *-un-lft-identity29.7
Applied add-cube-cbrt30.1
Applied times-frac30.2
Simplified30.2
rmApplied associate-*r/30.1
Applied frac-sub30.8
Simplified30.8
Taylor expanded around 0 14.9
rmApplied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2019308
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))