\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -15309.12152708683424862101674079895019531 \lor \neg \left(x \le 12455.49900284703107899986207485198974609\right):\\
\;\;\;\;-\left(\left(\frac{1}{x \cdot x} + \frac{3}{x}\right) + \frac{3}{{x}^{3}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} + \left(-\frac{x + 1}{x - 1}\right)\\
\end{array}double f(double x) {
double r119394 = x;
double r119395 = 1.0;
double r119396 = r119394 + r119395;
double r119397 = r119394 / r119396;
double r119398 = r119394 - r119395;
double r119399 = r119396 / r119398;
double r119400 = r119397 - r119399;
return r119400;
}
double f(double x) {
double r119401 = x;
double r119402 = -15309.121527086834;
bool r119403 = r119401 <= r119402;
double r119404 = 12455.499002847031;
bool r119405 = r119401 <= r119404;
double r119406 = !r119405;
bool r119407 = r119403 || r119406;
double r119408 = 1.0;
double r119409 = r119401 * r119401;
double r119410 = r119408 / r119409;
double r119411 = 3.0;
double r119412 = r119411 / r119401;
double r119413 = r119410 + r119412;
double r119414 = 3.0;
double r119415 = pow(r119401, r119414);
double r119416 = r119411 / r119415;
double r119417 = r119413 + r119416;
double r119418 = -r119417;
double r119419 = r119401 + r119408;
double r119420 = r119401 / r119419;
double r119421 = r119401 - r119408;
double r119422 = r119419 / r119421;
double r119423 = -r119422;
double r119424 = r119420 + r119423;
double r119425 = r119407 ? r119418 : r119424;
return r119425;
}



Bits error versus x
Results
if x < -15309.121527086834 or 12455.499002847031 < x Initial program 59.4
Taylor expanded around inf 0.3
Simplified0.0
if -15309.121527086834 < x < 12455.499002847031Initial program 0.1
rmApplied add-log-exp0.1
Applied add-log-exp0.1
Applied diff-log0.1
Simplified0.1
rmApplied sub-neg0.1
Applied exp-sum0.1
Applied log-prod0.1
Simplified0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019323 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))