\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.im \le -4.434994773334765 \cdot 10^{+162}:\\
\;\;\;\;\frac{-x.im}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.im \le 2.2908775229370544 \cdot 10^{+141}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\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 r2837737 = x_re;
double r2837738 = y_re;
double r2837739 = r2837737 * r2837738;
double r2837740 = x_im;
double r2837741 = y_im;
double r2837742 = r2837740 * r2837741;
double r2837743 = r2837739 + r2837742;
double r2837744 = r2837738 * r2837738;
double r2837745 = r2837741 * r2837741;
double r2837746 = r2837744 + r2837745;
double r2837747 = r2837743 / r2837746;
return r2837747;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2837748 = y_im;
double r2837749 = -4.434994773334765e+162;
bool r2837750 = r2837748 <= r2837749;
double r2837751 = x_im;
double r2837752 = -r2837751;
double r2837753 = y_re;
double r2837754 = hypot(r2837748, r2837753);
double r2837755 = r2837752 / r2837754;
double r2837756 = 2.2908775229370544e+141;
bool r2837757 = r2837748 <= r2837756;
double r2837758 = x_re;
double r2837759 = r2837753 * r2837758;
double r2837760 = fma(r2837748, r2837751, r2837759);
double r2837761 = r2837760 / r2837754;
double r2837762 = r2837761 / r2837754;
double r2837763 = r2837751 / r2837754;
double r2837764 = r2837757 ? r2837762 : r2837763;
double r2837765 = r2837750 ? r2837755 : r2837764;
return r2837765;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.im < -4.434994773334765e+162Initial program 43.3
Simplified43.3
rmApplied add-sqr-sqrt43.3
Applied associate-/r*43.3
rmApplied clear-num43.3
Simplified29.1
rmApplied associate-/r*28.3
Simplified28.3
Taylor expanded around -inf 12.3
Simplified12.3
if -4.434994773334765e+162 < y.im < 2.2908775229370544e+141Initial program 18.8
Simplified18.8
rmApplied add-sqr-sqrt18.8
Applied associate-/r*18.7
rmApplied clear-num19.0
Simplified12.1
rmApplied associate-/r*11.7
Simplified11.6
if 2.2908775229370544e+141 < y.im Initial program 43.5
Simplified43.5
rmApplied add-sqr-sqrt43.5
Applied associate-/r*43.5
rmApplied clear-num43.6
Simplified28.7
rmApplied associate-/r*28.0
Simplified28.0
Taylor expanded around inf 13.5
Final simplification11.9
herbie shell --seed 2019158 +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))))