\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.re \le -1.304579087607779 \cdot 10^{+161}:\\
\;\;\;\;\frac{x.im \cdot y.re - y.im \cdot x.re}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.re \le -7.011154002702933 \cdot 10^{+91}:\\
\;\;\;\;\frac{-x.im}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot y.re - y.im \cdot x.re}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{1}{\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 r2615928 = x_im;
double r2615929 = y_re;
double r2615930 = r2615928 * r2615929;
double r2615931 = x_re;
double r2615932 = y_im;
double r2615933 = r2615931 * r2615932;
double r2615934 = r2615930 - r2615933;
double r2615935 = r2615929 * r2615929;
double r2615936 = r2615932 * r2615932;
double r2615937 = r2615935 + r2615936;
double r2615938 = r2615934 / r2615937;
return r2615938;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2615939 = y_re;
double r2615940 = -1.304579087607779e+161;
bool r2615941 = r2615939 <= r2615940;
double r2615942 = x_im;
double r2615943 = r2615942 * r2615939;
double r2615944 = y_im;
double r2615945 = x_re;
double r2615946 = r2615944 * r2615945;
double r2615947 = r2615943 - r2615946;
double r2615948 = hypot(r2615944, r2615939);
double r2615949 = r2615947 / r2615948;
double r2615950 = 1.0;
double r2615951 = r2615950 / r2615948;
double r2615952 = r2615949 * r2615951;
double r2615953 = -7.011154002702933e+91;
bool r2615954 = r2615939 <= r2615953;
double r2615955 = -r2615942;
double r2615956 = r2615939 * r2615939;
double r2615957 = fma(r2615944, r2615944, r2615956);
double r2615958 = sqrt(r2615957);
double r2615959 = r2615955 / r2615958;
double r2615960 = r2615954 ? r2615959 : r2615952;
double r2615961 = r2615941 ? r2615952 : r2615960;
return r2615961;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.304579087607779e+161 or -7.011154002702933e+91 < y.re Initial program 26.5
Simplified26.5
rmApplied fma-neg26.5
rmApplied clear-num26.6
Simplified26.6
rmApplied *-un-lft-identity26.6
Applied add-sqr-sqrt26.6
Applied times-frac26.6
Applied add-cube-cbrt26.6
Applied times-frac26.5
Simplified26.5
Simplified17.1
if -1.304579087607779e+161 < y.re < -7.011154002702933e+91Initial program 27.0
Simplified27.0
rmApplied add-sqr-sqrt27.0
Applied associate-/r*26.9
Taylor expanded around -inf 25.8
Simplified25.8
Final simplification17.6
herbie shell --seed 2019165 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, imaginary part"
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))