\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.236056920632649636312988321949767458809 \cdot 10^{252}:\\
\;\;\;\;-\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \le -1.972049955288829430907028189059339655129 \cdot 10^{188}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{1}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{\mathsf{fma}\left(y.re, x.re, x.im \cdot y.im\right)}}\\
\mathbf{elif}\;y.re \le -9.931482377190183189903426181814662287963 \cdot 10^{103}:\\
\;\;\;\;-\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \le 7.28777456571337501443708414977136635674 \cdot 10^{101}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y.re, x.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r53685 = x_re;
double r53686 = y_re;
double r53687 = r53685 * r53686;
double r53688 = x_im;
double r53689 = y_im;
double r53690 = r53688 * r53689;
double r53691 = r53687 + r53690;
double r53692 = r53686 * r53686;
double r53693 = r53689 * r53689;
double r53694 = r53692 + r53693;
double r53695 = r53691 / r53694;
return r53695;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r53696 = y_re;
double r53697 = -1.2360569206326496e+252;
bool r53698 = r53696 <= r53697;
double r53699 = x_re;
double r53700 = y_im;
double r53701 = hypot(r53696, r53700);
double r53702 = r53699 / r53701;
double r53703 = -r53702;
double r53704 = -1.9720499552888294e+188;
bool r53705 = r53696 <= r53704;
double r53706 = 1.0;
double r53707 = r53706 / r53701;
double r53708 = x_im;
double r53709 = r53708 * r53700;
double r53710 = fma(r53696, r53699, r53709);
double r53711 = r53701 / r53710;
double r53712 = r53706 / r53711;
double r53713 = r53707 * r53712;
double r53714 = -9.931482377190183e+103;
bool r53715 = r53696 <= r53714;
double r53716 = 7.287774565713375e+101;
bool r53717 = r53696 <= r53716;
double r53718 = r53710 / r53701;
double r53719 = r53718 / r53701;
double r53720 = r53717 ? r53719 : r53702;
double r53721 = r53715 ? r53703 : r53720;
double r53722 = r53705 ? r53713 : r53721;
double r53723 = r53698 ? r53703 : r53722;
return r53723;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.2360569206326496e+252 or -1.9720499552888294e+188 < y.re < -9.931482377190183e+103Initial program 36.0
rmApplied add-sqr-sqrt36.0
Applied *-un-lft-identity36.0
Applied times-frac36.0
Simplified36.0
Simplified26.2
rmApplied associate-*r/26.2
Simplified26.1
Taylor expanded around -inf 16.2
Simplified16.2
if -1.2360569206326496e+252 < y.re < -1.9720499552888294e+188Initial program 45.3
rmApplied add-sqr-sqrt45.3
Applied *-un-lft-identity45.3
Applied times-frac45.3
Simplified45.3
Simplified27.9
rmApplied clear-num28.0
if -9.931482377190183e+103 < y.re < 7.287774565713375e+101Initial program 18.5
rmApplied add-sqr-sqrt18.5
Applied *-un-lft-identity18.5
Applied times-frac18.5
Simplified18.5
Simplified11.6
rmApplied associate-*r/11.5
Simplified11.4
if 7.287774565713375e+101 < y.re Initial program 40.0
rmApplied add-sqr-sqrt40.0
Applied *-un-lft-identity40.0
Applied times-frac40.0
Simplified40.0
Simplified26.2
rmApplied associate-*r/26.2
Simplified26.1
Taylor expanded around inf 17.8
Final simplification14.0
herbie shell --seed 2019195 +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))))