\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 -2.9064590122309793 \cdot 10^{+107}:\\
\;\;\;\;\frac{-x.re}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\\
\mathbf{else}:\\
\;\;\;\;\frac{(x.re \cdot y.re + \left(y.im \cdot x.im\right))_* \cdot \frac{1}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}}{\sqrt{(y.im \cdot y.im + \left(y.re \cdot y.re\right))_*}}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r2075862 = x_re;
double r2075863 = y_re;
double r2075864 = r2075862 * r2075863;
double r2075865 = x_im;
double r2075866 = y_im;
double r2075867 = r2075865 * r2075866;
double r2075868 = r2075864 + r2075867;
double r2075869 = r2075863 * r2075863;
double r2075870 = r2075866 * r2075866;
double r2075871 = r2075869 + r2075870;
double r2075872 = r2075868 / r2075871;
return r2075872;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2075873 = y_re;
double r2075874 = -2.9064590122309793e+107;
bool r2075875 = r2075873 <= r2075874;
double r2075876 = x_re;
double r2075877 = -r2075876;
double r2075878 = y_im;
double r2075879 = r2075873 * r2075873;
double r2075880 = fma(r2075878, r2075878, r2075879);
double r2075881 = sqrt(r2075880);
double r2075882 = r2075877 / r2075881;
double r2075883 = x_im;
double r2075884 = r2075878 * r2075883;
double r2075885 = fma(r2075876, r2075873, r2075884);
double r2075886 = 1.0;
double r2075887 = r2075886 / r2075881;
double r2075888 = r2075885 * r2075887;
double r2075889 = r2075888 / r2075881;
double r2075890 = r2075875 ? r2075882 : r2075889;
return r2075890;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -2.9064590122309793e+107Initial program 41.1
Simplified41.1
rmApplied add-sqr-sqrt41.1
Applied associate-/r*41.1
Taylor expanded around -inf 40.4
Simplified40.4
if -2.9064590122309793e+107 < y.re Initial program 22.6
Simplified22.6
rmApplied add-sqr-sqrt22.6
Applied associate-/r*22.5
rmApplied div-inv22.6
Final simplification25.6
herbie shell --seed 2019104 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))