\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 -8.62892292462021173 \cdot 10^{148}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le -8.94692393015579365 \cdot 10^{-253}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 8.4988934191698045 \cdot 10^{-298}:\\
\;\;\;\;\frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 5.4984404856254828 \cdot 10^{103}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\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 r96095 = x_re;
double r96096 = y_re;
double r96097 = r96095 * r96096;
double r96098 = x_im;
double r96099 = y_im;
double r96100 = r96098 * r96099;
double r96101 = r96097 + r96100;
double r96102 = r96096 * r96096;
double r96103 = r96099 * r96099;
double r96104 = r96102 + r96103;
double r96105 = r96101 / r96104;
return r96105;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r96106 = y_re;
double r96107 = -8.628922924620212e+148;
bool r96108 = r96106 <= r96107;
double r96109 = -1.0;
double r96110 = x_re;
double r96111 = r96109 * r96110;
double r96112 = y_im;
double r96113 = hypot(r96106, r96112);
double r96114 = 1.0;
double r96115 = r96113 * r96114;
double r96116 = r96111 / r96115;
double r96117 = -8.946923930155794e-253;
bool r96118 = r96106 <= r96117;
double r96119 = x_im;
double r96120 = r96119 * r96112;
double r96121 = fma(r96110, r96106, r96120);
double r96122 = r96121 / r96113;
double r96123 = r96122 / r96115;
double r96124 = 8.498893419169804e-298;
bool r96125 = r96106 <= r96124;
double r96126 = r96119 / r96115;
double r96127 = 5.498440485625483e+103;
bool r96128 = r96106 <= r96127;
double r96129 = r96110 / r96115;
double r96130 = r96128 ? r96123 : r96129;
double r96131 = r96125 ? r96126 : r96130;
double r96132 = r96118 ? r96123 : r96131;
double r96133 = r96108 ? r96116 : r96132;
return r96133;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -8.628922924620212e+148Initial program 45.1
rmApplied add-sqr-sqrt45.1
Applied *-un-lft-identity45.1
Applied times-frac45.1
Simplified45.1
Simplified29.5
rmApplied associate-*r/29.5
Simplified29.5
Taylor expanded around -inf 14.4
if -8.628922924620212e+148 < y.re < -8.946923930155794e-253 or 8.498893419169804e-298 < y.re < 5.498440485625483e+103Initial program 18.7
rmApplied add-sqr-sqrt18.7
Applied *-un-lft-identity18.7
Applied times-frac18.7
Simplified18.7
Simplified11.6
rmApplied associate-*r/11.6
Simplified11.5
if -8.946923930155794e-253 < y.re < 8.498893419169804e-298Initial program 22.8
rmApplied add-sqr-sqrt22.8
Applied *-un-lft-identity22.8
Applied times-frac22.8
Simplified22.8
Simplified12.7
rmApplied associate-*r/12.7
Simplified12.6
Taylor expanded around 0 32.2
if 5.498440485625483e+103 < y.re Initial program 40.3
rmApplied add-sqr-sqrt40.3
Applied *-un-lft-identity40.3
Applied times-frac40.3
Simplified40.3
Simplified26.7
rmApplied associate-*r/26.6
Simplified26.6
Taylor expanded around inf 15.9
Final simplification13.8
herbie shell --seed 2020021 +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))))