\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\begin{array}{l}
\mathbf{if}\;y.re \le 2.1596338989920688 \cdot 10^{+44}:\\
\;\;\;\;\frac{\frac{x.im \cdot y.re - y.im \cdot x.re}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r1233863 = x_im;
double r1233864 = y_re;
double r1233865 = r1233863 * r1233864;
double r1233866 = x_re;
double r1233867 = y_im;
double r1233868 = r1233866 * r1233867;
double r1233869 = r1233865 - r1233868;
double r1233870 = r1233864 * r1233864;
double r1233871 = r1233867 * r1233867;
double r1233872 = r1233870 + r1233871;
double r1233873 = r1233869 / r1233872;
return r1233873;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r1233874 = y_re;
double r1233875 = 2.1596338989920688e+44;
bool r1233876 = r1233874 <= r1233875;
double r1233877 = x_im;
double r1233878 = r1233877 * r1233874;
double r1233879 = y_im;
double r1233880 = x_re;
double r1233881 = r1233879 * r1233880;
double r1233882 = r1233878 - r1233881;
double r1233883 = r1233874 * r1233874;
double r1233884 = fma(r1233879, r1233879, r1233883);
double r1233885 = sqrt(r1233884);
double r1233886 = r1233882 / r1233885;
double r1233887 = r1233886 / r1233885;
double r1233888 = r1233877 / r1233885;
double r1233889 = r1233876 ? r1233887 : r1233888;
return r1233889;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < 2.1596338989920688e+44Initial program 23.3
Simplified23.3
rmApplied add-sqr-sqrt23.3
Applied associate-/r*23.2
Taylor expanded around -inf 23.2
if 2.1596338989920688e+44 < y.re Initial program 35.6
Simplified35.6
rmApplied add-sqr-sqrt35.6
Applied associate-/r*35.5
Taylor expanded around -inf 35.5
Taylor expanded around inf 36.3
Final simplification26.2
herbie shell --seed 2019139 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, imaginary part"
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))