\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.741292395726274 \cdot 10^{176}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 6.2260315404588448 \cdot 10^{142}:\\
\;\;\;\;\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 r73472 = x_re;
double r73473 = y_re;
double r73474 = r73472 * r73473;
double r73475 = x_im;
double r73476 = y_im;
double r73477 = r73475 * r73476;
double r73478 = r73474 + r73477;
double r73479 = r73473 * r73473;
double r73480 = r73476 * r73476;
double r73481 = r73479 + r73480;
double r73482 = r73478 / r73481;
return r73482;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r73483 = y_re;
double r73484 = -2.741292395726274e+176;
bool r73485 = r73483 <= r73484;
double r73486 = -1.0;
double r73487 = x_re;
double r73488 = r73486 * r73487;
double r73489 = y_im;
double r73490 = hypot(r73483, r73489);
double r73491 = 1.0;
double r73492 = r73490 * r73491;
double r73493 = r73488 / r73492;
double r73494 = 6.226031540458845e+142;
bool r73495 = r73483 <= r73494;
double r73496 = x_im;
double r73497 = r73496 * r73489;
double r73498 = fma(r73487, r73483, r73497);
double r73499 = r73498 / r73490;
double r73500 = r73499 / r73492;
double r73501 = r73487 / r73492;
double r73502 = r73495 ? r73500 : r73501;
double r73503 = r73485 ? r73493 : r73502;
return r73503;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -2.741292395726274e+176Initial program 42.3
rmApplied add-sqr-sqrt42.3
Applied *-un-lft-identity42.3
Applied times-frac42.3
Simplified42.3
Simplified28.2
rmApplied associate-*r/28.2
Simplified28.1
Taylor expanded around -inf 12.1
if -2.741292395726274e+176 < y.re < 6.226031540458845e+142Initial program 20.2
rmApplied add-sqr-sqrt20.2
Applied *-un-lft-identity20.2
Applied times-frac20.2
Simplified20.2
Simplified13.5
rmApplied associate-*r/13.5
Simplified13.4
if 6.226031540458845e+142 < y.re Initial program 42.3
rmApplied add-sqr-sqrt42.3
Applied *-un-lft-identity42.3
Applied times-frac42.3
Simplified42.3
Simplified27.4
rmApplied associate-*r/27.4
Simplified27.3
Taylor expanded around inf 13.4
Final simplification13.3
herbie shell --seed 2020089 +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))))