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



Bits error versus x
Results
Initial program 29.2
rmApplied clear-num29.2
Applied frac-sub28.9
Simplified28.9
Taylor expanded around 0 0.0
Simplified0.0
Taylor expanded around 0 0.0
Final simplification0.0
herbie shell --seed 2020071
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))