\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 -1.676220666344615615802840188676763171273 \cdot 10^{75}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 1.27854918231393790515454488962691098663 \cdot 10^{162}:\\
\;\;\;\;\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 r66577 = x_re;
double r66578 = y_re;
double r66579 = r66577 * r66578;
double r66580 = x_im;
double r66581 = y_im;
double r66582 = r66580 * r66581;
double r66583 = r66579 + r66582;
double r66584 = r66578 * r66578;
double r66585 = r66581 * r66581;
double r66586 = r66584 + r66585;
double r66587 = r66583 / r66586;
return r66587;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r66588 = y_re;
double r66589 = -1.6762206663446156e+75;
bool r66590 = r66588 <= r66589;
double r66591 = -1.0;
double r66592 = x_re;
double r66593 = r66591 * r66592;
double r66594 = y_im;
double r66595 = hypot(r66588, r66594);
double r66596 = 1.0;
double r66597 = r66595 * r66596;
double r66598 = r66593 / r66597;
double r66599 = 1.278549182313938e+162;
bool r66600 = r66588 <= r66599;
double r66601 = x_im;
double r66602 = r66601 * r66594;
double r66603 = fma(r66592, r66588, r66602);
double r66604 = r66603 / r66595;
double r66605 = r66604 / r66597;
double r66606 = r66592 / r66597;
double r66607 = r66600 ? r66605 : r66606;
double r66608 = r66590 ? r66598 : r66607;
return r66608;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.6762206663446156e+75Initial program 36.7
rmApplied add-sqr-sqrt36.7
Applied *-un-lft-identity36.7
Applied times-frac36.7
Simplified36.7
Simplified24.6
rmApplied associate-*r/24.6
Simplified24.5
Taylor expanded around -inf 17.0
if -1.6762206663446156e+75 < y.re < 1.278549182313938e+162Initial program 19.8
rmApplied add-sqr-sqrt19.8
Applied *-un-lft-identity19.8
Applied times-frac19.8
Simplified19.8
Simplified12.3
rmApplied associate-*r/12.2
Simplified12.1
if 1.278549182313938e+162 < y.re Initial program 45.5
rmApplied add-sqr-sqrt45.5
Applied *-un-lft-identity45.5
Applied times-frac45.5
Simplified45.5
Simplified31.0
rmApplied associate-*r/31.0
Simplified31.0
Taylor expanded around inf 13.9
Final simplification13.3
herbie shell --seed 2020001 +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))))