\frac{x}{x + 1} - \frac{x + 1}{x - 1}1 \cdot \frac{\frac{-2 \cdot x}{x + 1} - 1}{x - 1}double code(double x) {
return ((double) ((x / ((double) (x + 1.0))) - (((double) (x + 1.0)) / ((double) (x - 1.0)))));
}
double code(double x) {
return ((double) (1.0 * (((double) ((((double) (-2.0 * x)) / ((double) (x + 1.0))) - 1.0)) / ((double) (x - 1.0)))));
}



Bits error versus x
Results
Initial program 29.3
rmApplied frac-sub30.4
Simplified15.1
Simplified15.1
rmApplied *-un-lft-identity15.1
Applied times-frac15.1
Simplified15.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020181
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))