\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):\\
\;\;\;\;\left(\frac{-1}{{x}^{2}} - \frac{3}{x}\right) - \frac{3}{{x}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{x}{x + 1} - \left(x + 1\right) \cdot \frac{1}{x - 1}}\right)\\
\end{array}double f(double x) {
double r96147 = x;
double r96148 = 1.0;
double r96149 = r96147 + r96148;
double r96150 = r96147 / r96149;
double r96151 = r96147 - r96148;
double r96152 = r96149 / r96151;
double r96153 = r96150 - r96152;
return r96153;
}
double f(double x) {
double r96154 = x;
double r96155 = -10207.349462423768;
bool r96156 = r96154 <= r96155;
double r96157 = 8646.459775303862;
bool r96158 = r96154 <= r96157;
double r96159 = !r96158;
bool r96160 = r96156 || r96159;
double r96161 = 1.0;
double r96162 = -r96161;
double r96163 = 2.0;
double r96164 = pow(r96154, r96163);
double r96165 = r96162 / r96164;
double r96166 = 3.0;
double r96167 = r96166 / r96154;
double r96168 = r96165 - r96167;
double r96169 = 3.0;
double r96170 = pow(r96154, r96169);
double r96171 = r96166 / r96170;
double r96172 = r96168 - r96171;
double r96173 = r96154 + r96161;
double r96174 = r96154 / r96173;
double r96175 = 1.0;
double r96176 = r96154 - r96161;
double r96177 = r96175 / r96176;
double r96178 = r96173 * r96177;
double r96179 = r96174 - r96178;
double r96180 = exp(r96179);
double r96181 = log(r96180);
double r96182 = r96160 ? r96172 : r96181;
return r96182;
}



Bits error versus x
Results
if x < -10207.349462423768 or 8646.459775303862 < x Initial program 59.3
Taylor expanded around inf 0.3
Simplified0.0
if -10207.349462423768 < x < 8646.459775303862Initial program 0.1
rmApplied div-inv0.1
rmApplied add-log-exp0.1
Applied add-log-exp0.1
Applied diff-log0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019354
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))