\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.676220666344615615802840188676763171273 \cdot 10^{75}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 1.27854918231393790515454488962691098663 \cdot 10^{162}:\\
\;\;\;\;\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 r125277 = x_re;
double r125278 = y_re;
double r125279 = r125277 * r125278;
double r125280 = x_im;
double r125281 = y_im;
double r125282 = r125280 * r125281;
double r125283 = r125279 + r125282;
double r125284 = r125278 * r125278;
double r125285 = r125281 * r125281;
double r125286 = r125284 + r125285;
double r125287 = r125283 / r125286;
return r125287;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r125288 = y_re;
double r125289 = -1.6762206663446156e+75;
bool r125290 = r125288 <= r125289;
double r125291 = -1.0;
double r125292 = x_re;
double r125293 = r125291 * r125292;
double r125294 = y_im;
double r125295 = hypot(r125288, r125294);
double r125296 = 1.0;
double r125297 = r125295 * r125296;
double r125298 = r125293 / r125297;
double r125299 = 1.278549182313938e+162;
bool r125300 = r125288 <= r125299;
double r125301 = x_im;
double r125302 = r125301 * r125294;
double r125303 = fma(r125292, r125288, r125302);
double r125304 = r125303 / r125295;
double r125305 = r125304 / r125297;
double r125306 = r125292 / r125297;
double r125307 = r125300 ? r125305 : r125306;
double r125308 = r125290 ? r125298 : r125307;
return r125308;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.6762206663446156e+75Initial program 36.7
rmApplied add-sqr-sqrt36.7
Applied *-un-lft-identity36.7
Applied times-frac36.7
Simplified36.7
Simplified24.6
rmApplied associate-*r/24.6
Simplified24.5
Taylor expanded around -inf 17.0
if -1.6762206663446156e+75 < y.re < 1.278549182313938e+162Initial program 19.8
rmApplied add-sqr-sqrt19.8
Applied *-un-lft-identity19.8
Applied times-frac19.8
Simplified19.8
Simplified12.3
rmApplied associate-*r/12.2
Simplified12.1
if 1.278549182313938e+162 < y.re Initial program 45.5
rmApplied add-sqr-sqrt45.5
Applied *-un-lft-identity45.5
Applied times-frac45.5
Simplified45.5
Simplified31.0
rmApplied associate-*r/31.0
Simplified31.0
Taylor expanded around inf 13.9
Final simplification13.3
herbie shell --seed 2020001 +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))))