\frac{1}{x + 1} - \frac{1}{x - 1}\left(2 \cdot \frac{1}{x - 1}\right) \cdot \frac{-1}{x + 1}double f(double x) {
double r4640020 = 1.0;
double r4640021 = x;
double r4640022 = r4640021 + r4640020;
double r4640023 = r4640020 / r4640022;
double r4640024 = r4640021 - r4640020;
double r4640025 = r4640020 / r4640024;
double r4640026 = r4640023 - r4640025;
return r4640026;
}
double f(double x) {
double r4640027 = 2.0;
double r4640028 = 1.0;
double r4640029 = x;
double r4640030 = r4640029 - r4640028;
double r4640031 = r4640028 / r4640030;
double r4640032 = r4640027 * r4640031;
double r4640033 = -1.0;
double r4640034 = r4640029 + r4640028;
double r4640035 = r4640033 / r4640034;
double r4640036 = r4640032 * r4640035;
return r4640036;
}



Bits error versus x
Results
Initial program 14.7
rmApplied flip--28.7
Applied associate-/r/28.7
Applied flip-+14.7
Applied associate-/r/14.7
Applied distribute-lft-out--14.1
Taylor expanded around 0 0.3
rmApplied difference-of-squares0.3
Applied *-un-lft-identity0.3
Applied times-frac0.1
Applied associate-*l*0.1
Final simplification0.1
herbie shell --seed 2019172
(FPCore (x)
:name "Asymptote A"
(- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))