\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.0930594930595556 \cdot 10^{+87}:\\
\;\;\;\;\frac{-x.re}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.re \le 2.1006973305354477 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r2328788 = x_re;
double r2328789 = y_re;
double r2328790 = r2328788 * r2328789;
double r2328791 = x_im;
double r2328792 = y_im;
double r2328793 = r2328791 * r2328792;
double r2328794 = r2328790 + r2328793;
double r2328795 = r2328789 * r2328789;
double r2328796 = r2328792 * r2328792;
double r2328797 = r2328795 + r2328796;
double r2328798 = r2328794 / r2328797;
return r2328798;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2328799 = y_re;
double r2328800 = -1.0930594930595556e+87;
bool r2328801 = r2328799 <= r2328800;
double r2328802 = x_re;
double r2328803 = -r2328802;
double r2328804 = y_im;
double r2328805 = hypot(r2328804, r2328799);
double r2328806 = r2328803 / r2328805;
double r2328807 = 2.1006973305354477e+171;
bool r2328808 = r2328799 <= r2328807;
double r2328809 = x_im;
double r2328810 = r2328804 * r2328809;
double r2328811 = fma(r2328802, r2328799, r2328810);
double r2328812 = r2328811 / r2328805;
double r2328813 = r2328812 / r2328805;
double r2328814 = r2328802 / r2328805;
double r2328815 = r2328808 ? r2328813 : r2328814;
double r2328816 = r2328801 ? r2328806 : r2328815;
return r2328816;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.0930594930595556e+87Initial program 38.6
Simplified38.6
rmApplied add-sqr-sqrt38.6
Applied associate-/r*38.6
rmApplied clear-num38.8
Simplified27.7
rmApplied associate-/r*27.0
Simplified27.0
Taylor expanded around -inf 17.4
Simplified17.4
if -1.0930594930595556e+87 < y.re < 2.1006973305354477e+171Initial program 20.4
Simplified20.4
rmApplied add-sqr-sqrt20.5
Applied associate-/r*20.4
rmApplied clear-num20.6
Simplified13.4
rmApplied associate-/r*13.0
Simplified12.9
if 2.1006973305354477e+171 < y.re Initial program 44.5
Simplified44.5
rmApplied add-sqr-sqrt44.5
Applied associate-/r*44.5
rmApplied clear-num44.5
Simplified30.1
rmApplied associate-/r*29.5
Simplified29.5
Taylor expanded around inf 14.1
Final simplification13.9
herbie shell --seed 2019165 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))