\frac{x}{x + 1} - \frac{x + 1}{x - 1}\begin{array}{l}
\mathbf{if}\;x \le -11166.74680765492303180508315563201904297 \lor \neg \left(x \le 17625.54287631354236509650945663452148438\right):\\
\;\;\;\;\mathsf{fma}\left(-\frac{\sqrt{3}}{x}, \frac{\sqrt{3}}{x \cdot x}, -\frac{\frac{1}{x} + 3}{x}\right) + \left(\frac{1}{x} + \frac{-1}{x}\right) \cdot \left(\frac{1}{x} + 3\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{1 \cdot 1 - x \cdot x}, 1 - x, \frac{-\left(x + 1\right)}{x - 1}\right)\\
\end{array}double f(double x) {
double r175890 = x;
double r175891 = 1.0;
double r175892 = r175890 + r175891;
double r175893 = r175890 / r175892;
double r175894 = r175890 - r175891;
double r175895 = r175892 / r175894;
double r175896 = r175893 - r175895;
return r175896;
}
double f(double x) {
double r175897 = x;
double r175898 = -11166.746807654923;
bool r175899 = r175897 <= r175898;
double r175900 = 17625.542876313542;
bool r175901 = r175897 <= r175900;
double r175902 = !r175901;
bool r175903 = r175899 || r175902;
double r175904 = 3.0;
double r175905 = sqrt(r175904);
double r175906 = r175905 / r175897;
double r175907 = -r175906;
double r175908 = r175897 * r175897;
double r175909 = r175905 / r175908;
double r175910 = 1.0;
double r175911 = r175910 / r175897;
double r175912 = r175911 + r175904;
double r175913 = r175912 / r175897;
double r175914 = -r175913;
double r175915 = fma(r175907, r175909, r175914);
double r175916 = 1.0;
double r175917 = r175916 / r175897;
double r175918 = -1.0;
double r175919 = r175918 / r175897;
double r175920 = r175917 + r175919;
double r175921 = r175920 * r175912;
double r175922 = r175915 + r175921;
double r175923 = r175910 * r175910;
double r175924 = r175923 - r175908;
double r175925 = r175897 / r175924;
double r175926 = r175910 - r175897;
double r175927 = r175897 + r175910;
double r175928 = -r175927;
double r175929 = r175897 - r175910;
double r175930 = r175928 / r175929;
double r175931 = fma(r175925, r175926, r175930);
double r175932 = r175903 ? r175922 : r175931;
return r175932;
}



Bits error versus x
if x < -11166.746807654923 or 17625.542876313542 < x Initial program 59.4
Simplified59.4
Taylor expanded around inf 0.3
Simplified0.0
rmApplied div-inv0.0
Applied div-inv0.3
Applied distribute-rgt-out0.3
Applied cube-mult0.3
Applied add-sqr-sqrt0.3
Applied times-frac0.3
Applied distribute-lft-neg-in0.3
Applied prod-diff0.3
Simplified0.2
Simplified0.0
if -11166.746807654923 < x < 17625.542876313542Initial program 0.1
Simplified0.1
rmApplied flip-+0.1
Applied associate-/r/0.1
Applied fma-neg0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019194 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
(- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))