\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.im \le 9.936266958075772 \cdot 10^{+94}:\\
\;\;\;\;\frac{\frac{1}{\frac{\mathsf{hypot}\left(y.im, y.re\right)}{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\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 r2530744 = x_re;
double r2530745 = y_re;
double r2530746 = r2530744 * r2530745;
double r2530747 = x_im;
double r2530748 = y_im;
double r2530749 = r2530747 * r2530748;
double r2530750 = r2530746 + r2530749;
double r2530751 = r2530745 * r2530745;
double r2530752 = r2530748 * r2530748;
double r2530753 = r2530751 + r2530752;
double r2530754 = r2530750 / r2530753;
return r2530754;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2530755 = y_im;
double r2530756 = 9.936266958075772e+94;
bool r2530757 = r2530755 <= r2530756;
double r2530758 = 1.0;
double r2530759 = y_re;
double r2530760 = hypot(r2530755, r2530759);
double r2530761 = x_re;
double r2530762 = x_im;
double r2530763 = r2530762 * r2530755;
double r2530764 = fma(r2530761, r2530759, r2530763);
double r2530765 = r2530760 / r2530764;
double r2530766 = r2530758 / r2530765;
double r2530767 = r2530766 / r2530760;
double r2530768 = r2530762 / r2530760;
double r2530769 = r2530757 ? r2530767 : r2530768;
return r2530769;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.im < 9.936266958075772e+94Initial program 22.9
Simplified22.9
rmApplied add-sqr-sqrt22.9
Applied associate-/r*22.8
rmApplied fma-udef22.8
Applied hypot-def22.8
rmApplied fma-udef22.8
Applied hypot-def14.0
rmApplied *-un-lft-identity14.0
Applied associate-/l*14.1
if 9.936266958075772e+94 < y.im Initial program 38.8
Simplified38.8
rmApplied add-sqr-sqrt38.8
Applied associate-/r*38.7
rmApplied fma-udef38.7
Applied hypot-def38.7
rmApplied fma-udef38.7
Applied hypot-def25.9
Taylor expanded around 0 16.7
Final simplification14.6
herbie shell --seed 2019138 +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))))