\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.2360569206326496 \cdot 10^{252}:\\
\;\;\;\;\frac{-x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \le -4.92872222777350137 \cdot 10^{189}:\\
\;\;\;\;\frac{\sqrt[3]{{\left(\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\right)}^{3}}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \le -9.9314823771901832 \cdot 10^{103}:\\
\;\;\;\;\frac{-x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \le 7.287774565713375 \cdot 10^{101}:\\
\;\;\;\;\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)}\\
\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 r47107 = x_re;
double r47108 = y_re;
double r47109 = r47107 * r47108;
double r47110 = x_im;
double r47111 = y_im;
double r47112 = r47110 * r47111;
double r47113 = r47109 + r47112;
double r47114 = r47108 * r47108;
double r47115 = r47111 * r47111;
double r47116 = r47114 + r47115;
double r47117 = r47113 / r47116;
return r47117;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r47118 = y_re;
double r47119 = -1.2360569206326496e+252;
bool r47120 = r47118 <= r47119;
double r47121 = x_re;
double r47122 = -r47121;
double r47123 = y_im;
double r47124 = hypot(r47118, r47123);
double r47125 = r47122 / r47124;
double r47126 = -4.928722227773501e+189;
bool r47127 = r47118 <= r47126;
double r47128 = x_im;
double r47129 = r47128 * r47123;
double r47130 = fma(r47121, r47118, r47129);
double r47131 = r47130 / r47124;
double r47132 = 3.0;
double r47133 = pow(r47131, r47132);
double r47134 = cbrt(r47133);
double r47135 = r47134 / r47124;
double r47136 = -9.931482377190183e+103;
bool r47137 = r47118 <= r47136;
double r47138 = 7.287774565713375e+101;
bool r47139 = r47118 <= r47138;
double r47140 = r47131 / r47124;
double r47141 = r47121 / r47124;
double r47142 = r47139 ? r47140 : r47141;
double r47143 = r47137 ? r47125 : r47142;
double r47144 = r47127 ? r47135 : r47143;
double r47145 = r47120 ? r47125 : r47144;
return r47145;
}



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 -4.928722227773501e+189 < y.re < -9.931482377190183e+103Initial program 36.1
rmApplied add-sqr-sqrt36.1
Applied *-un-lft-identity36.1
Applied times-frac36.1
Simplified36.1
Simplified26.0
rmApplied *-un-lft-identity26.0
Applied associate-*l*26.0
Simplified26.0
Taylor expanded around -inf 16.2
Simplified16.2
if -1.2360569206326496e+252 < y.re < -4.928722227773501e+189Initial program 45.4
rmApplied add-sqr-sqrt45.4
Applied *-un-lft-identity45.4
Applied times-frac45.4
Simplified45.4
Simplified28.3
rmApplied *-un-lft-identity28.3
Applied associate-*l*28.3
Simplified28.3
rmApplied add-cbrt-cube28.6
Simplified28.6
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 *-un-lft-identity11.6
Applied associate-*l*11.6
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 *-un-lft-identity26.2
Applied associate-*l*26.2
Simplified26.1
Taylor expanded around inf 17.8
Final simplification14.1
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))))