\frac{1}{x + 1} - \frac{1}{x - 1}\frac{\frac{1}{x + 1}}{x - 1} \cdot -2double f(double x) {
double r4852261 = 1.0;
double r4852262 = x;
double r4852263 = r4852262 + r4852261;
double r4852264 = r4852261 / r4852263;
double r4852265 = r4852262 - r4852261;
double r4852266 = r4852261 / r4852265;
double r4852267 = r4852264 - r4852266;
return r4852267;
}
double f(double x) {
double r4852268 = 1.0;
double r4852269 = x;
double r4852270 = r4852269 + r4852268;
double r4852271 = r4852268 / r4852270;
double r4852272 = r4852269 - r4852268;
double r4852273 = r4852271 / r4852272;
double r4852274 = -2.0;
double r4852275 = r4852273 * r4852274;
return r4852275;
}



Bits error versus x
Results
Initial program 14.9
rmApplied flip--29.6
Applied associate-/r/29.6
Applied flip-+14.9
Applied associate-/r/14.9
Applied distribute-lft-out--14.3
Simplified14.3
Taylor expanded around 0 0.4
rmApplied difference-of-squares0.4
Applied associate-/r*0.1
Final simplification0.1
herbie shell --seed 2019165
(FPCore (x)
:name "Asymptote A"
(- (/ 1 (+ x 1)) (/ 1 (- x 1))))