\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\begin{array}{l}
\mathbf{if}\;y.re \le -1.09704610901182658 \cdot 10^{117}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 5.2660357604755783 \cdot 10^{182}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right) \cdot \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r62867 = x_re;
double r62868 = y_re;
double r62869 = r62867 * r62868;
double r62870 = x_im;
double r62871 = y_im;
double r62872 = r62870 * r62871;
double r62873 = r62869 + r62872;
double r62874 = r62868 * r62868;
double r62875 = r62871 * r62871;
double r62876 = r62874 + r62875;
double r62877 = r62873 / r62876;
return r62877;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r62878 = y_re;
double r62879 = -1.0970461090118266e+117;
bool r62880 = r62878 <= r62879;
double r62881 = -1.0;
double r62882 = x_re;
double r62883 = r62881 * r62882;
double r62884 = y_im;
double r62885 = hypot(r62878, r62884);
double r62886 = 1.0;
double r62887 = r62885 * r62886;
double r62888 = r62883 / r62887;
double r62889 = 5.2660357604755783e+182;
bool r62890 = r62878 <= r62889;
double r62891 = x_im;
double r62892 = r62891 * r62884;
double r62893 = fma(r62882, r62878, r62892);
double r62894 = r62886 / r62885;
double r62895 = r62893 * r62894;
double r62896 = r62895 / r62887;
double r62897 = r62882 / r62887;
double r62898 = r62890 ? r62896 : r62897;
double r62899 = r62880 ? r62888 : r62898;
return r62899;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.0970461090118266e+117Initial program 40.9
rmApplied add-sqr-sqrt40.9
Applied *-un-lft-identity40.9
Applied times-frac40.9
Simplified40.9
Simplified27.4
rmApplied associate-*r/27.4
Simplified27.4
Taylor expanded around -inf 15.6
if -1.0970461090118266e+117 < y.re < 5.2660357604755783e+182Initial program 19.4
rmApplied add-sqr-sqrt19.4
Applied *-un-lft-identity19.4
Applied times-frac19.4
Simplified19.4
Simplified12.2
rmApplied associate-*r/12.2
Simplified12.1
rmApplied div-inv12.2
if 5.2660357604755783e+182 < y.re Initial program 42.4
rmApplied add-sqr-sqrt42.4
Applied *-un-lft-identity42.4
Applied times-frac42.4
Simplified42.4
Simplified28.9
rmApplied associate-*r/28.9
Simplified28.9
Taylor expanded around inf 11.5
Final simplification12.7
herbie shell --seed 2020049 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
:precision binary64
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))