\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.im \le -9.070380995118472894632770750389862361245 \cdot 10^{169}:\\
\;\;\;\;x.im \cdot \frac{-1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.im \le 7.042501497551500124137433547855094410259 \cdot 10^{117}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r2802878 = x_re;
double r2802879 = y_re;
double r2802880 = r2802878 * r2802879;
double r2802881 = x_im;
double r2802882 = y_im;
double r2802883 = r2802881 * r2802882;
double r2802884 = r2802880 + r2802883;
double r2802885 = r2802879 * r2802879;
double r2802886 = r2802882 * r2802882;
double r2802887 = r2802885 + r2802886;
double r2802888 = r2802884 / r2802887;
return r2802888;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2802889 = y_im;
double r2802890 = -9.070380995118473e+169;
bool r2802891 = r2802889 <= r2802890;
double r2802892 = x_im;
double r2802893 = -1.0;
double r2802894 = y_re;
double r2802895 = hypot(r2802894, r2802889);
double r2802896 = r2802893 / r2802895;
double r2802897 = r2802892 * r2802896;
double r2802898 = 7.0425014975515e+117;
bool r2802899 = r2802889 <= r2802898;
double r2802900 = 1.0;
double r2802901 = r2802900 / r2802895;
double r2802902 = x_re;
double r2802903 = r2802894 * r2802902;
double r2802904 = fma(r2802889, r2802892, r2802903);
double r2802905 = r2802904 / r2802895;
double r2802906 = r2802901 * r2802905;
double r2802907 = r2802892 / r2802895;
double r2802908 = r2802899 ? r2802906 : r2802907;
double r2802909 = r2802891 ? r2802897 : r2802908;
return r2802909;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.im < -9.070380995118473e+169Initial program 43.6
rmApplied add-sqr-sqrt43.6
Applied associate-/r*43.6
rmApplied hypot-def43.6
rmApplied add-sqr-sqrt43.6
Applied add-sqr-sqrt43.6
Applied sqrt-prod43.6
Applied *-un-lft-identity43.6
Applied times-frac43.6
Applied times-frac43.6
Simplified43.6
Simplified29.7
Taylor expanded around -inf 12.0
Simplified12.0
if -9.070380995118473e+169 < y.im < 7.0425014975515e+117Initial program 19.7
rmApplied add-sqr-sqrt19.7
Applied associate-/r*19.6
rmApplied hypot-def19.6
rmApplied add-sqr-sqrt19.8
Applied add-sqr-sqrt19.8
Applied sqrt-prod19.9
Applied *-un-lft-identity19.9
Applied times-frac20.0
Applied times-frac20.0
Simplified19.8
Simplified12.4
if 7.0425014975515e+117 < y.im Initial program 41.6
rmApplied add-sqr-sqrt41.6
Applied associate-/r*41.5
rmApplied hypot-def41.5
Taylor expanded around 0 16.0
Final simplification12.9
herbie shell --seed 2019200 +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))))