\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.0042415763270424 \cdot 10^{167}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 1.5555378499724725 \cdot 10^{174}:\\
\;\;\;\;\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 r106585 = x_re;
double r106586 = y_re;
double r106587 = r106585 * r106586;
double r106588 = x_im;
double r106589 = y_im;
double r106590 = r106588 * r106589;
double r106591 = r106587 + r106590;
double r106592 = r106586 * r106586;
double r106593 = r106589 * r106589;
double r106594 = r106592 + r106593;
double r106595 = r106591 / r106594;
return r106595;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r106596 = y_re;
double r106597 = -1.0042415763270424e+167;
bool r106598 = r106596 <= r106597;
double r106599 = -1.0;
double r106600 = x_re;
double r106601 = r106599 * r106600;
double r106602 = y_im;
double r106603 = hypot(r106596, r106602);
double r106604 = 1.0;
double r106605 = r106603 * r106604;
double r106606 = r106601 / r106605;
double r106607 = 1.5555378499724725e+174;
bool r106608 = r106596 <= r106607;
double r106609 = x_im;
double r106610 = r106609 * r106602;
double r106611 = fma(r106600, r106596, r106610);
double r106612 = r106611 / r106603;
double r106613 = r106612 / r106605;
double r106614 = r106600 / r106605;
double r106615 = r106608 ? r106613 : r106614;
double r106616 = r106598 ? r106606 : r106615;
return r106616;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.0042415763270424e+167Initial program 45.1
rmApplied add-sqr-sqrt45.1
Applied *-un-lft-identity45.1
Applied times-frac45.1
Simplified45.1
Simplified30.1
rmApplied associate-*r/30.1
Simplified30.1
Taylor expanded around -inf 11.8
if -1.0042415763270424e+167 < y.re < 1.5555378499724725e+174Initial program 20.9
rmApplied add-sqr-sqrt20.9
Applied *-un-lft-identity20.9
Applied times-frac21.0
Simplified21.0
Simplified13.2
rmApplied associate-*r/13.1
Simplified13.1
if 1.5555378499724725e+174 < y.re Initial program 44.5
rmApplied add-sqr-sqrt44.5
Applied *-un-lft-identity44.5
Applied times-frac44.5
Simplified44.5
Simplified30.0
rmApplied associate-*r/30.0
Simplified29.9
Taylor expanded around inf 12.0
Final simplification12.8
herbie shell --seed 2020036 +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))))