\frac{1}{x + 1} - \frac{1}{x - 1}\frac{\frac{1}{x + 1} \cdot \left(-2\right)}{x - 1}double f(double x) {
double r54340 = 1.0;
double r54341 = x;
double r54342 = r54341 + r54340;
double r54343 = r54340 / r54342;
double r54344 = r54341 - r54340;
double r54345 = r54340 / r54344;
double r54346 = r54343 - r54345;
return r54346;
}
double f(double x) {
double r54347 = 1.0;
double r54348 = x;
double r54349 = r54348 + r54347;
double r54350 = r54347 / r54349;
double r54351 = 2.0;
double r54352 = -r54351;
double r54353 = r54350 * r54352;
double r54354 = r54348 - r54347;
double r54355 = r54353 / r54354;
return r54355;
}



Bits error versus x
Results
Initial program 14.2
rmApplied flip--28.9
Applied associate-/r/28.9
Applied flip-+14.3
Applied associate-/r/14.2
Applied distribute-lft-out--13.7
Taylor expanded around 0 0.4
rmApplied difference-of-squares0.4
Applied associate-/r*0.1
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2020046 +o rules:numerics
(FPCore (x)
:name "Asymptote A"
:precision binary64
(- (/ 1 (+ x 1)) (/ 1 (- x 1))))