\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.75773301102882159 \cdot 10^{162}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 9.4134247976417832 \cdot 10^{156}:\\
\;\;\;\;\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 r56568 = x_re;
double r56569 = y_re;
double r56570 = r56568 * r56569;
double r56571 = x_im;
double r56572 = y_im;
double r56573 = r56571 * r56572;
double r56574 = r56570 + r56573;
double r56575 = r56569 * r56569;
double r56576 = r56572 * r56572;
double r56577 = r56575 + r56576;
double r56578 = r56574 / r56577;
return r56578;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r56579 = y_re;
double r56580 = -1.7577330110288216e+162;
bool r56581 = r56579 <= r56580;
double r56582 = -1.0;
double r56583 = x_re;
double r56584 = r56582 * r56583;
double r56585 = y_im;
double r56586 = hypot(r56579, r56585);
double r56587 = 1.0;
double r56588 = r56586 * r56587;
double r56589 = r56584 / r56588;
double r56590 = 9.413424797641783e+156;
bool r56591 = r56579 <= r56590;
double r56592 = x_im;
double r56593 = r56592 * r56585;
double r56594 = fma(r56583, r56579, r56593);
double r56595 = r56594 / r56586;
double r56596 = r56595 / r56588;
double r56597 = r56583 / r56588;
double r56598 = r56591 ? r56596 : r56597;
double r56599 = r56581 ? r56589 : r56598;
return r56599;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.7577330110288216e+162Initial program 45.1
rmApplied add-sqr-sqrt45.1
Applied *-un-lft-identity45.1
Applied times-frac45.1
Simplified45.1
Simplified29.0
rmApplied associate-*r/29.0
Simplified29.0
Taylor expanded around -inf 13.4
if -1.7577330110288216e+162 < y.re < 9.413424797641783e+156Initial program 20.0
rmApplied add-sqr-sqrt20.0
Applied *-un-lft-identity20.0
Applied times-frac20.0
Simplified20.0
Simplified12.9
rmApplied associate-*r/12.9
Simplified12.8
if 9.413424797641783e+156 < y.re Initial program 44.2
rmApplied add-sqr-sqrt44.2
Applied *-un-lft-identity44.2
Applied times-frac44.2
Simplified44.2
Simplified28.8
rmApplied associate-*r/28.8
Simplified28.8
Taylor expanded around inf 13.4
Final simplification12.9
herbie shell --seed 2020060 +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))))