\frac{1}{x + 1} - \frac{1}{x - 1}\frac{\frac{1}{x + 1} \cdot \left(-2\right)}{x - 1}double f(double x) {
double r8040222 = 1.0;
double r8040223 = x;
double r8040224 = r8040223 + r8040222;
double r8040225 = r8040222 / r8040224;
double r8040226 = r8040223 - r8040222;
double r8040227 = r8040222 / r8040226;
double r8040228 = r8040225 - r8040227;
return r8040228;
}
double f(double x) {
double r8040229 = 1.0;
double r8040230 = x;
double r8040231 = r8040230 + r8040229;
double r8040232 = r8040229 / r8040231;
double r8040233 = 2.0;
double r8040234 = -r8040233;
double r8040235 = r8040232 * r8040234;
double r8040236 = r8040230 - r8040229;
double r8040237 = r8040235 / r8040236;
return r8040237;
}



Bits error versus x
Results
Initial program 14.8
rmApplied flip--29.2
Applied associate-/r/29.2
Applied flip-+14.8
Applied associate-/r/14.8
Applied distribute-lft-out--14.2
Taylor expanded around 0 0.4
rmApplied difference-of-squares0.5
Applied associate-/r*0.1
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2019174
(FPCore (x)
:name "Asymptote A"
(- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))