\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -10207.34946242376827285625040531158447266 \lor \neg \left(x \le 8646.459775303861533757299184799194335938\right):\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{\frac{1}{x}}{x}, \frac{-3}{x}\right) - 3 \cdot \frac{1}{{x}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{x}{x + 1} - \frac{x + 1}{x - 1}}\right)\\
\end{array}double f(double x) {
double r124890 = x;
double r124891 = 1.0;
double r124892 = r124890 + r124891;
double r124893 = r124890 / r124892;
double r124894 = r124890 - r124891;
double r124895 = r124892 / r124894;
double r124896 = r124893 - r124895;
return r124896;
}
double f(double x) {
double r124897 = x;
double r124898 = -10207.349462423768;
bool r124899 = r124897 <= r124898;
double r124900 = 8646.459775303862;
bool r124901 = r124897 <= r124900;
double r124902 = !r124901;
bool r124903 = r124899 || r124902;
double r124904 = -1.0;
double r124905 = 1.0;
double r124906 = r124905 / r124897;
double r124907 = r124906 / r124897;
double r124908 = 3.0;
double r124909 = -r124908;
double r124910 = r124909 / r124897;
double r124911 = fma(r124904, r124907, r124910);
double r124912 = 1.0;
double r124913 = 3.0;
double r124914 = pow(r124897, r124913);
double r124915 = r124912 / r124914;
double r124916 = r124908 * r124915;
double r124917 = r124911 - r124916;
double r124918 = r124897 + r124905;
double r124919 = r124897 / r124918;
double r124920 = r124897 - r124905;
double r124921 = r124918 / r124920;
double r124922 = r124919 - r124921;
double r124923 = exp(r124922);
double r124924 = log(r124923);
double r124925 = r124903 ? r124917 : r124924;
return r124925;
}



Bits error versus x
if x < -10207.349462423768 or 8646.459775303862 < 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 -10207.349462423768 < x < 8646.459775303862Initial program 0.1
rmApplied add-log-exp0.1
Applied add-log-exp0.1
Applied diff-log0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019354 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))