\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 -2.2616143508082277 \cdot 10^{79} \lor \neg \left(y.re \le 1.03827084215452011 \cdot 10^{-35}\right):\\
\;\;\;\;{\left(\frac{\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.re}}}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{\frac{x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\right)}^{1}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{x.im \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{\frac{x.re}{1}}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)}}}\right)}^{1}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r81551 = x_im;
double r81552 = y_re;
double r81553 = r81551 * r81552;
double r81554 = x_re;
double r81555 = y_im;
double r81556 = r81554 * r81555;
double r81557 = r81553 - r81556;
double r81558 = r81552 * r81552;
double r81559 = r81555 * r81555;
double r81560 = r81558 + r81559;
double r81561 = r81557 / r81560;
return r81561;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r81562 = y_re;
double r81563 = -2.2616143508082277e+79;
bool r81564 = r81562 <= r81563;
double r81565 = 1.0382708421545201e-35;
bool r81566 = r81562 <= r81565;
double r81567 = !r81566;
bool r81568 = r81564 || r81567;
double r81569 = x_im;
double r81570 = y_im;
double r81571 = hypot(r81562, r81570);
double r81572 = r81571 / r81562;
double r81573 = r81569 / r81572;
double r81574 = r81573 / r81571;
double r81575 = x_re;
double r81576 = r81575 * r81570;
double r81577 = r81576 / r81571;
double r81578 = r81577 / r81571;
double r81579 = r81574 - r81578;
double r81580 = 1.0;
double r81581 = pow(r81579, r81580);
double r81582 = r81569 * r81562;
double r81583 = r81582 / r81571;
double r81584 = r81583 / r81571;
double r81585 = r81575 / r81580;
double r81586 = r81570 / r81571;
double r81587 = r81571 / r81586;
double r81588 = r81585 / r81587;
double r81589 = r81584 - r81588;
double r81590 = pow(r81589, r81580);
double r81591 = r81568 ? r81581 : r81590;
return r81591;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
if y.re < -2.2616143508082277e+79 or 1.0382708421545201e-35 < y.re Initial program 33.6
rmApplied add-sqr-sqrt33.6
Applied *-un-lft-identity33.6
Applied times-frac33.6
Simplified33.6
Simplified23.3
rmApplied pow123.3
Applied pow123.3
Applied pow-prod-down23.3
Simplified23.2
rmApplied div-sub23.2
Applied div-sub23.2
rmApplied associate-/l*7.8
if -2.2616143508082277e+79 < y.re < 1.0382708421545201e-35Initial program 19.6
rmApplied add-sqr-sqrt19.6
Applied *-un-lft-identity19.6
Applied times-frac19.6
Simplified19.6
Simplified11.8
rmApplied pow111.8
Applied pow111.8
Applied pow-prod-down11.8
Simplified11.7
rmApplied div-sub11.7
Applied div-sub11.7
rmApplied *-un-lft-identity11.7
Applied times-frac1.7
Applied associate-/l*1.9
Final simplification4.8
herbie shell --seed 2020060 +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))))