\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -12729.812151040191 \lor \neg \left(x \le 10297.87902655745\right):\\
\;\;\;\;\frac{-1}{{x}^{2}} - \mathsf{fma}\left(3, \frac{1}{{x}^{3}}, \frac{3}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{x \cdot x - 1 \cdot 1}, x - 1, -\left(x + 1\right) \cdot \frac{x + 1}{x \cdot x - 1 \cdot 1}\right) + \frac{x + 1}{x \cdot x - 1 \cdot 1} \cdot \left(\left(-\left(x + 1\right)\right) + \left(x + 1\right)\right)\\
\end{array}double f(double x) {
double r104053 = x;
double r104054 = 1.0;
double r104055 = r104053 + r104054;
double r104056 = r104053 / r104055;
double r104057 = r104053 - r104054;
double r104058 = r104055 / r104057;
double r104059 = r104056 - r104058;
return r104059;
}
double f(double x) {
double r104060 = x;
double r104061 = -12729.81215104019;
bool r104062 = r104060 <= r104061;
double r104063 = 10297.87902655745;
bool r104064 = r104060 <= r104063;
double r104065 = !r104064;
bool r104066 = r104062 || r104065;
double r104067 = 1.0;
double r104068 = -r104067;
double r104069 = 2.0;
double r104070 = pow(r104060, r104069);
double r104071 = r104068 / r104070;
double r104072 = 3.0;
double r104073 = 1.0;
double r104074 = 3.0;
double r104075 = pow(r104060, r104074);
double r104076 = r104073 / r104075;
double r104077 = r104072 / r104060;
double r104078 = fma(r104072, r104076, r104077);
double r104079 = r104071 - r104078;
double r104080 = r104060 * r104060;
double r104081 = r104067 * r104067;
double r104082 = r104080 - r104081;
double r104083 = r104060 / r104082;
double r104084 = r104060 - r104067;
double r104085 = r104060 + r104067;
double r104086 = r104085 / r104082;
double r104087 = r104085 * r104086;
double r104088 = -r104087;
double r104089 = fma(r104083, r104084, r104088);
double r104090 = -r104085;
double r104091 = r104090 + r104085;
double r104092 = r104086 * r104091;
double r104093 = r104089 + r104092;
double r104094 = r104066 ? r104079 : r104093;
return r104094;
}



Bits error versus x
if x < -12729.81215104019 or 10297.87902655745 < x Initial program 59.5
Taylor expanded around inf 0.3
Simplified0.3
Taylor expanded around 0 0.3
Simplified0.0
if -12729.81215104019 < x < 10297.87902655745Initial program 0.1
rmApplied flip--0.1
Applied associate-/r/0.1
Applied flip-+0.1
Applied associate-/r/0.1
Applied prod-diff0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020021 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
:precision binary64
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))