\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -12526.87883169779706804547458887100219727 \lor \neg \left(x \le 12009.41967600402495008893311023712158203\right):\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{\frac{1}{x}}{x}, \frac{-3}{x}\right) - 3 \cdot \frac{1}{{x}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{1}{x + 1}, -\frac{x + 1}{x - 1}\right)\\
\end{array}double f(double x) {
double r124518 = x;
double r124519 = 1.0;
double r124520 = r124518 + r124519;
double r124521 = r124518 / r124520;
double r124522 = r124518 - r124519;
double r124523 = r124520 / r124522;
double r124524 = r124521 - r124523;
return r124524;
}
double f(double x) {
double r124525 = x;
double r124526 = -12526.878831697797;
bool r124527 = r124525 <= r124526;
double r124528 = 12009.419676004025;
bool r124529 = r124525 <= r124528;
double r124530 = !r124529;
bool r124531 = r124527 || r124530;
double r124532 = -1.0;
double r124533 = 1.0;
double r124534 = r124533 / r124525;
double r124535 = r124534 / r124525;
double r124536 = 3.0;
double r124537 = -r124536;
double r124538 = r124537 / r124525;
double r124539 = fma(r124532, r124535, r124538);
double r124540 = 1.0;
double r124541 = 3.0;
double r124542 = pow(r124525, r124541);
double r124543 = r124540 / r124542;
double r124544 = r124536 * r124543;
double r124545 = r124539 - r124544;
double r124546 = r124525 + r124533;
double r124547 = r124540 / r124546;
double r124548 = r124525 - r124533;
double r124549 = r124546 / r124548;
double r124550 = -r124549;
double r124551 = fma(r124525, r124547, r124550);
double r124552 = r124531 ? r124545 : r124551;
return r124552;
}



Bits error versus x
if x < -12526.878831697797 or 12009.419676004025 < x Initial program 59.3
Taylor expanded around inf 0.3
Simplified0.3
rmApplied fma-udef0.3
Applied associate--r+0.3
Simplified0.0
if -12526.878831697797 < x < 12009.419676004025Initial program 0.1
rmApplied div-inv0.1
Applied fma-neg0.1
Final simplification0.1
herbie shell --seed 2019353 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))