\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\begin{array}{l}
\mathbf{if}\;y.im \le -3.8916390277007425 \cdot 10^{179}:\\
\;\;\;\;\frac{x.re}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.im \le 9.6609644371716767 \cdot 10^{96}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.im, y.re, -y.im \cdot x.re\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 r117739 = x_im;
double r117740 = y_re;
double r117741 = r117739 * r117740;
double r117742 = x_re;
double r117743 = y_im;
double r117744 = r117742 * r117743;
double r117745 = r117741 - r117744;
double r117746 = r117740 * r117740;
double r117747 = r117743 * r117743;
double r117748 = r117746 + r117747;
double r117749 = r117745 / r117748;
return r117749;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r117750 = y_im;
double r117751 = -3.8916390277007425e+179;
bool r117752 = r117750 <= r117751;
double r117753 = x_re;
double r117754 = y_re;
double r117755 = hypot(r117750, r117754);
double r117756 = r117753 / r117755;
double r117757 = 9.660964437171677e+96;
bool r117758 = r117750 <= r117757;
double r117759 = x_im;
double r117760 = r117750 * r117753;
double r117761 = -r117760;
double r117762 = fma(r117759, r117754, r117761);
double r117763 = r117762 / r117755;
double r117764 = r117763 / r117755;
double r117765 = -r117753;
double r117766 = r117765 / r117755;
double r117767 = r117758 ? r117764 : r117766;
double r117768 = r117752 ? r117756 : r117767;
return r117768;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.im < -3.8916390277007425e+179Initial program 44.0
Simplified44.0
rmApplied add-sqr-sqrt44.0
Applied *-un-lft-identity44.0
Applied times-frac44.0
Simplified44.0
Simplified30.8
rmApplied associate-*r/30.8
Simplified30.8
rmApplied clear-num30.8
Taylor expanded around -inf 10.8
if -3.8916390277007425e+179 < y.im < 9.660964437171677e+96Initial program 20.4
Simplified20.4
rmApplied add-sqr-sqrt20.4
Applied *-un-lft-identity20.4
Applied times-frac20.4
Simplified20.4
Simplified12.4
rmApplied associate-*r/12.4
Simplified12.3
if 9.660964437171677e+96 < y.im Initial program 40.0
Simplified40.0
rmApplied add-sqr-sqrt40.0
Applied *-un-lft-identity40.0
Applied times-frac40.0
Simplified40.0
Simplified27.4
rmApplied associate-*r/27.4
Simplified27.4
Taylor expanded around 0 16.4
Simplified16.4
Final simplification12.9
herbie shell --seed 2020046 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, imaginary part"
:precision binary64
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))