\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 -9.727239627244697 \cdot 10^{203}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 8.7515444588077776 \cdot 10^{105}:\\
\;\;\;\;\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 r63145 = x_re;
double r63146 = y_re;
double r63147 = r63145 * r63146;
double r63148 = x_im;
double r63149 = y_im;
double r63150 = r63148 * r63149;
double r63151 = r63147 + r63150;
double r63152 = r63146 * r63146;
double r63153 = r63149 * r63149;
double r63154 = r63152 + r63153;
double r63155 = r63151 / r63154;
return r63155;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r63156 = y_re;
double r63157 = -9.727239627244697e+203;
bool r63158 = r63156 <= r63157;
double r63159 = -1.0;
double r63160 = x_re;
double r63161 = r63159 * r63160;
double r63162 = y_im;
double r63163 = hypot(r63156, r63162);
double r63164 = 1.0;
double r63165 = r63163 * r63164;
double r63166 = r63161 / r63165;
double r63167 = 8.751544458807778e+105;
bool r63168 = r63156 <= r63167;
double r63169 = x_im;
double r63170 = r63169 * r63162;
double r63171 = fma(r63160, r63156, r63170);
double r63172 = r63171 / r63163;
double r63173 = r63172 / r63165;
double r63174 = r63160 / r63165;
double r63175 = r63168 ? r63173 : r63174;
double r63176 = r63158 ? r63166 : r63175;
return r63176;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -9.727239627244697e+203Initial program 42.0
rmApplied add-sqr-sqrt42.0
Applied *-un-lft-identity42.0
Applied times-frac42.0
Simplified42.0
Simplified31.1
rmApplied associate-*r/31.1
Simplified31.0
Taylor expanded around -inf 11.0
if -9.727239627244697e+203 < y.re < 8.751544458807778e+105Initial program 21.0
rmApplied add-sqr-sqrt21.0
Applied *-un-lft-identity21.0
Applied times-frac21.0
Simplified21.0
Simplified13.0
rmApplied associate-*r/13.0
Simplified12.9
if 8.751544458807778e+105 < y.re Initial program 39.0
rmApplied add-sqr-sqrt39.0
Applied *-un-lft-identity39.0
Applied times-frac39.0
Simplified39.0
Simplified25.2
rmApplied associate-*r/25.2
Simplified25.2
Taylor expanded around inf 16.3
Final simplification13.3
herbie shell --seed 2020024 +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))))