\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}\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} = -\infty:\\
\;\;\;\;\frac{-1 \cdot x.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\\
\mathbf{elif}\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \le 6.3661068469165699 \cdot 10^{269}:\\
\;\;\;\;\frac{1}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r61045 = x_im;
double r61046 = y_re;
double r61047 = r61045 * r61046;
double r61048 = x_re;
double r61049 = y_im;
double r61050 = r61048 * r61049;
double r61051 = r61047 - r61050;
double r61052 = r61046 * r61046;
double r61053 = r61049 * r61049;
double r61054 = r61052 + r61053;
double r61055 = r61051 / r61054;
return r61055;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r61056 = x_im;
double r61057 = y_re;
double r61058 = r61056 * r61057;
double r61059 = x_re;
double r61060 = y_im;
double r61061 = r61059 * r61060;
double r61062 = r61058 - r61061;
double r61063 = r61057 * r61057;
double r61064 = r61060 * r61060;
double r61065 = r61063 + r61064;
double r61066 = r61062 / r61065;
double r61067 = -inf.0;
bool r61068 = r61066 <= r61067;
double r61069 = -1.0;
double r61070 = r61069 * r61056;
double r61071 = sqrt(r61065);
double r61072 = r61070 / r61071;
double r61073 = 6.36610684691657e+269;
bool r61074 = r61066 <= r61073;
double r61075 = 1.0;
double r61076 = r61075 / r61071;
double r61077 = r61062 / r61071;
double r61078 = r61076 * r61077;
double r61079 = r61056 / r61071;
double r61080 = r61074 ? r61078 : r61079;
double r61081 = r61068 ? r61072 : r61080;
return r61081;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
if (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))) < -inf.0Initial program 64.0
rmApplied add-sqr-sqrt64.0
Applied associate-/r*64.0
Taylor expanded around -inf 51.9
if -inf.0 < (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))) < 6.36610684691657e+269Initial program 12.0
rmApplied clear-num12.1
rmApplied *-un-lft-identity12.1
Applied add-sqr-sqrt12.1
Applied times-frac12.1
Applied add-cube-cbrt12.1
Applied times-frac12.1
Simplified12.1
Simplified12.0
if 6.36610684691657e+269 < (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))) Initial program 61.5
rmApplied add-sqr-sqrt61.5
Applied associate-/r*61.5
Taylor expanded around inf 59.8
Final simplification25.3
herbie shell --seed 2020018
(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))))