\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 -7.21703912221375955 \cdot 10^{90}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 5.09516002030621912 \cdot 10^{119}:\\
\;\;\;\;\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 r110626 = x_re;
double r110627 = y_re;
double r110628 = r110626 * r110627;
double r110629 = x_im;
double r110630 = y_im;
double r110631 = r110629 * r110630;
double r110632 = r110628 + r110631;
double r110633 = r110627 * r110627;
double r110634 = r110630 * r110630;
double r110635 = r110633 + r110634;
double r110636 = r110632 / r110635;
return r110636;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r110637 = y_re;
double r110638 = -7.21703912221376e+90;
bool r110639 = r110637 <= r110638;
double r110640 = -1.0;
double r110641 = x_re;
double r110642 = r110640 * r110641;
double r110643 = y_im;
double r110644 = hypot(r110637, r110643);
double r110645 = 1.0;
double r110646 = r110644 * r110645;
double r110647 = r110642 / r110646;
double r110648 = 5.095160020306219e+119;
bool r110649 = r110637 <= r110648;
double r110650 = x_im;
double r110651 = r110650 * r110643;
double r110652 = fma(r110641, r110637, r110651);
double r110653 = r110652 / r110644;
double r110654 = r110653 / r110646;
double r110655 = r110641 / r110646;
double r110656 = r110649 ? r110654 : r110655;
double r110657 = r110639 ? r110647 : r110656;
return r110657;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -7.21703912221376e+90Initial program 39.8
rmApplied add-sqr-sqrt39.8
Applied *-un-lft-identity39.8
Applied times-frac39.8
Simplified39.8
Simplified26.6
rmApplied associate-*r/26.6
Simplified26.5
Taylor expanded around -inf 17.5
if -7.21703912221376e+90 < y.re < 5.095160020306219e+119Initial program 19.1
rmApplied add-sqr-sqrt19.1
Applied *-un-lft-identity19.1
Applied times-frac19.2
Simplified19.1
Simplified12.1
rmApplied associate-*r/12.0
Simplified11.9
if 5.095160020306219e+119 < y.re Initial program 41.0
rmApplied add-sqr-sqrt41.0
Applied *-un-lft-identity41.0
Applied times-frac40.9
Simplified40.9
Simplified26.7
rmApplied associate-*r/26.7
Simplified26.7
Taylor expanded around inf 16.2
Final simplification13.6
herbie shell --seed 2020057 +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))))