\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 -6.24305058454472 \cdot 10^{+142}:\\
\;\;\;\;\frac{-x.re}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.re \le 1.0408154521829639 \cdot 10^{+152}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y.re, x.re, y.im \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r1996068 = x_re;
double r1996069 = y_re;
double r1996070 = r1996068 * r1996069;
double r1996071 = x_im;
double r1996072 = y_im;
double r1996073 = r1996071 * r1996072;
double r1996074 = r1996070 + r1996073;
double r1996075 = r1996069 * r1996069;
double r1996076 = r1996072 * r1996072;
double r1996077 = r1996075 + r1996076;
double r1996078 = r1996074 / r1996077;
return r1996078;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r1996079 = y_re;
double r1996080 = -6.24305058454472e+142;
bool r1996081 = r1996079 <= r1996080;
double r1996082 = x_re;
double r1996083 = -r1996082;
double r1996084 = y_im;
double r1996085 = hypot(r1996084, r1996079);
double r1996086 = r1996083 / r1996085;
double r1996087 = 1.0408154521829639e+152;
bool r1996088 = r1996079 <= r1996087;
double r1996089 = x_im;
double r1996090 = r1996084 * r1996089;
double r1996091 = fma(r1996079, r1996082, r1996090);
double r1996092 = r1996091 / r1996085;
double r1996093 = r1996092 / r1996085;
double r1996094 = r1996082 / r1996085;
double r1996095 = r1996088 ? r1996093 : r1996094;
double r1996096 = r1996081 ? r1996086 : r1996095;
return r1996096;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -6.24305058454472e+142Initial program 42.7
Simplified42.7
rmApplied add-sqr-sqrt42.7
Applied *-un-lft-identity42.7
Applied times-frac42.7
rmApplied fma-udef42.7
Applied hypot-def42.7
rmApplied associate-*l/42.7
Simplified26.8
Taylor expanded around -inf 14.2
Simplified14.2
if -6.24305058454472e+142 < y.re < 1.0408154521829639e+152Initial program 18.8
Simplified18.8
rmApplied add-sqr-sqrt18.8
Applied *-un-lft-identity18.8
Applied times-frac18.8
rmApplied fma-udef18.8
Applied hypot-def18.8
rmApplied associate-*l/18.7
Simplified12.3
if 1.0408154521829639e+152 < y.re Initial program 45.2
Simplified45.2
rmApplied add-sqr-sqrt45.2
Applied *-un-lft-identity45.2
Applied times-frac45.2
rmApplied fma-udef45.2
Applied hypot-def45.2
rmApplied associate-*l/45.2
Simplified28.4
Taylor expanded around inf 13.7
Final simplification12.8
herbie shell --seed 2019143 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))