\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}\;\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \le 2.846399672864898633139753001838080406359 \cdot 10^{282}:\\
\;\;\;\;\frac{\frac{1}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}}}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\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 r50158 = x_re;
double r50159 = y_re;
double r50160 = r50158 * r50159;
double r50161 = x_im;
double r50162 = y_im;
double r50163 = r50161 * r50162;
double r50164 = r50160 + r50163;
double r50165 = r50159 * r50159;
double r50166 = r50162 * r50162;
double r50167 = r50165 + r50166;
double r50168 = r50164 / r50167;
return r50168;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r50169 = x_re;
double r50170 = y_re;
double r50171 = r50169 * r50170;
double r50172 = x_im;
double r50173 = y_im;
double r50174 = r50172 * r50173;
double r50175 = r50171 + r50174;
double r50176 = r50170 * r50170;
double r50177 = r50173 * r50173;
double r50178 = r50176 + r50177;
double r50179 = r50175 / r50178;
double r50180 = 2.8463996728648986e+282;
bool r50181 = r50179 <= r50180;
double r50182 = 1.0;
double r50183 = hypot(r50170, r50173);
double r50184 = fma(r50169, r50170, r50174);
double r50185 = r50183 / r50184;
double r50186 = r50182 / r50185;
double r50187 = r50183 * r50182;
double r50188 = r50186 / r50187;
double r50189 = r50172 / r50187;
double r50190 = r50181 ? r50188 : r50189;
return r50190;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if (/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))) < 2.8463996728648986e+282Initial program 14.1
rmApplied add-sqr-sqrt14.1
Applied *-un-lft-identity14.1
Applied times-frac14.1
Simplified14.1
Simplified2.9
rmApplied associate-*r/2.8
Simplified2.7
rmApplied clear-num2.8
if 2.8463996728648986e+282 < (/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))) Initial program 62.9
rmApplied add-sqr-sqrt62.9
Applied *-un-lft-identity62.9
Applied times-frac62.9
Simplified62.9
Simplified60.3
rmApplied associate-*r/60.3
Simplified60.3
Taylor expanded around 0 48.4
Final simplification13.9
herbie shell --seed 2019362 +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))))