\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 r50901 = x_re;
double r50902 = y_re;
double r50903 = r50901 * r50902;
double r50904 = x_im;
double r50905 = y_im;
double r50906 = r50904 * r50905;
double r50907 = r50903 + r50906;
double r50908 = r50902 * r50902;
double r50909 = r50905 * r50905;
double r50910 = r50908 + r50909;
double r50911 = r50907 / r50910;
return r50911;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r50912 = y_re;
double r50913 = -1.0042415763270424e+167;
bool r50914 = r50912 <= r50913;
double r50915 = -1.0;
double r50916 = x_re;
double r50917 = r50915 * r50916;
double r50918 = y_im;
double r50919 = hypot(r50912, r50918);
double r50920 = 1.0;
double r50921 = r50919 * r50920;
double r50922 = r50917 / r50921;
double r50923 = 1.5555378499724725e+174;
bool r50924 = r50912 <= r50923;
double r50925 = x_im;
double r50926 = r50925 * r50918;
double r50927 = fma(r50916, r50912, r50926);
double r50928 = r50927 / r50919;
double r50929 = r50928 / r50921;
double r50930 = r50916 / r50921;
double r50931 = r50924 ? r50929 : r50930;
double r50932 = r50914 ? r50922 : r50931;
return r50932;
}



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))))