\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -20084.46570443186283227987587451934814453 \lor \neg \left(x \le 12201.68751023736513161566108465194702148\right):\\
\;\;\;\;-\left(\left(\frac{3}{x} + \frac{3}{{x}^{3}}\right) + \frac{1}{x \cdot x}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{1}{x + 1}, \left(-\mathsf{fma}\left(x, x, 1 \cdot \left(1 + x\right)\right)\right) \cdot \frac{1 + x}{{x}^{3} - {1}^{3}}\right) + \mathsf{fma}\left(-\mathsf{fma}\left(x, x, 1 \cdot \left(1 + x\right)\right), \frac{1 + x}{{x}^{3} - {1}^{3}}, \mathsf{fma}\left(x, x, 1 \cdot \left(1 + x\right)\right) \cdot \frac{1 + x}{{x}^{3} - {1}^{3}}\right)\\
\end{array}double f(double x) {
double r96006 = x;
double r96007 = 1.0;
double r96008 = r96006 + r96007;
double r96009 = r96006 / r96008;
double r96010 = r96006 - r96007;
double r96011 = r96008 / r96010;
double r96012 = r96009 - r96011;
return r96012;
}
double f(double x) {
double r96013 = x;
double r96014 = -20084.465704431863;
bool r96015 = r96013 <= r96014;
double r96016 = 12201.687510237365;
bool r96017 = r96013 <= r96016;
double r96018 = !r96017;
bool r96019 = r96015 || r96018;
double r96020 = 3.0;
double r96021 = r96020 / r96013;
double r96022 = 3.0;
double r96023 = pow(r96013, r96022);
double r96024 = r96020 / r96023;
double r96025 = r96021 + r96024;
double r96026 = 1.0;
double r96027 = r96013 * r96013;
double r96028 = r96026 / r96027;
double r96029 = r96025 + r96028;
double r96030 = -r96029;
double r96031 = 1.0;
double r96032 = r96013 + r96026;
double r96033 = r96031 / r96032;
double r96034 = r96026 + r96013;
double r96035 = r96026 * r96034;
double r96036 = fma(r96013, r96013, r96035);
double r96037 = -r96036;
double r96038 = pow(r96026, r96022);
double r96039 = r96023 - r96038;
double r96040 = r96034 / r96039;
double r96041 = r96037 * r96040;
double r96042 = fma(r96013, r96033, r96041);
double r96043 = r96036 * r96040;
double r96044 = fma(r96037, r96040, r96043);
double r96045 = r96042 + r96044;
double r96046 = r96019 ? r96030 : r96045;
return r96046;
}



Bits error versus x
if x < -20084.465704431863 or 12201.687510237365 < x Initial program 59.2
Simplified59.2
rmApplied add-cbrt-cube60.4
Applied add-cbrt-cube62.0
Applied cbrt-undiv62.0
Simplified59.2
Taylor expanded around inf 0.3
Simplified0.0
if -20084.465704431863 < x < 12201.687510237365Initial program 0.1
Simplified0.1
rmApplied add-cbrt-cube0.1
Applied add-cbrt-cube0.1
Applied cbrt-undiv0.1
Simplified0.1
rmApplied flip3--0.1
Applied associate-/r/0.1
Applied div-inv0.1
Applied unpow-prod-down0.1
Applied cbrt-prod0.1
Applied prod-diff0.1
Simplified0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019235 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))