\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 -2.4261660902384713 \cdot 10^{188}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 6.02089915346211438 \cdot 10^{80}:\\
\;\;\;\;\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 r73622 = x_re;
double r73623 = y_re;
double r73624 = r73622 * r73623;
double r73625 = x_im;
double r73626 = y_im;
double r73627 = r73625 * r73626;
double r73628 = r73624 + r73627;
double r73629 = r73623 * r73623;
double r73630 = r73626 * r73626;
double r73631 = r73629 + r73630;
double r73632 = r73628 / r73631;
return r73632;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r73633 = y_re;
double r73634 = -2.4261660902384713e+188;
bool r73635 = r73633 <= r73634;
double r73636 = -1.0;
double r73637 = x_re;
double r73638 = r73636 * r73637;
double r73639 = y_im;
double r73640 = hypot(r73633, r73639);
double r73641 = 1.0;
double r73642 = r73640 * r73641;
double r73643 = r73638 / r73642;
double r73644 = 6.020899153462114e+80;
bool r73645 = r73633 <= r73644;
double r73646 = x_im;
double r73647 = r73646 * r73639;
double r73648 = fma(r73637, r73633, r73647);
double r73649 = r73648 / r73640;
double r73650 = r73649 / r73642;
double r73651 = r73637 / r73642;
double r73652 = r73645 ? r73650 : r73651;
double r73653 = r73635 ? r73643 : r73652;
return r73653;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -2.4261660902384713e+188Initial program 41.2
rmApplied add-sqr-sqrt41.2
Applied *-un-lft-identity41.2
Applied times-frac41.2
Simplified41.2
Simplified29.0
rmApplied associate-*r/29.0
Simplified29.0
Taylor expanded around -inf 12.2
if -2.4261660902384713e+188 < y.re < 6.020899153462114e+80Initial program 20.5
rmApplied add-sqr-sqrt20.5
Applied *-un-lft-identity20.5
Applied times-frac20.5
Simplified20.5
Simplified12.5
rmApplied associate-*r/12.5
Simplified12.4
if 6.020899153462114e+80 < y.re Initial program 37.5
rmApplied add-sqr-sqrt37.5
Applied *-un-lft-identity37.5
Applied times-frac37.5
Simplified37.5
Simplified25.5
rmApplied associate-*r/25.5
Simplified25.4
Taylor expanded around inf 17.2
Final simplification13.3
herbie shell --seed 2020039 +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))))