\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.760768008240295 \cdot 10^{135}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 5.258979463944342 \cdot 10^{219}:\\
\;\;\;\;\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 r66160 = x_re;
double r66161 = y_re;
double r66162 = r66160 * r66161;
double r66163 = x_im;
double r66164 = y_im;
double r66165 = r66163 * r66164;
double r66166 = r66162 + r66165;
double r66167 = r66161 * r66161;
double r66168 = r66164 * r66164;
double r66169 = r66167 + r66168;
double r66170 = r66166 / r66169;
return r66170;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r66171 = y_re;
double r66172 = -2.760768008240295e+135;
bool r66173 = r66171 <= r66172;
double r66174 = -1.0;
double r66175 = x_re;
double r66176 = r66174 * r66175;
double r66177 = y_im;
double r66178 = hypot(r66171, r66177);
double r66179 = 1.0;
double r66180 = r66178 * r66179;
double r66181 = r66176 / r66180;
double r66182 = 5.258979463944342e+219;
bool r66183 = r66171 <= r66182;
double r66184 = x_im;
double r66185 = r66184 * r66177;
double r66186 = fma(r66175, r66171, r66185);
double r66187 = r66186 / r66178;
double r66188 = r66187 / r66180;
double r66189 = r66175 / r66180;
double r66190 = r66183 ? r66188 : r66189;
double r66191 = r66173 ? r66181 : r66190;
return r66191;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -2.760768008240295e+135Initial program 42.9
rmApplied add-sqr-sqrt42.9
Applied *-un-lft-identity42.9
Applied times-frac42.9
Simplified42.9
Simplified29.0
rmApplied associate-*r/29.0
Simplified28.9
Taylor expanded around -inf 14.6
if -2.760768008240295e+135 < y.re < 5.258979463944342e+219Initial program 21.1
rmApplied add-sqr-sqrt21.1
Applied *-un-lft-identity21.1
Applied times-frac21.1
Simplified21.1
Simplified13.2
rmApplied associate-*r/13.2
Simplified13.1
if 5.258979463944342e+219 < y.re Initial program 41.8
rmApplied add-sqr-sqrt41.8
Applied *-un-lft-identity41.8
Applied times-frac41.8
Simplified41.8
Simplified31.2
rmApplied associate-*r/31.2
Simplified31.2
Taylor expanded around inf 8.8
Final simplification13.0
herbie shell --seed 2020003 +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))))