\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.2109434524169916 \cdot 10^{+96}:\\
\;\;\;\;\frac{-x.im}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\\
\mathbf{elif}\;y.re \le 5.2422713568197025 \cdot 10^{+36}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.im, y.re, x.re \cdot \left(-y.im\right)\right)}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\sqrt{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r2241454 = x_im;
double r2241455 = y_re;
double r2241456 = r2241454 * r2241455;
double r2241457 = x_re;
double r2241458 = y_im;
double r2241459 = r2241457 * r2241458;
double r2241460 = r2241456 - r2241459;
double r2241461 = r2241455 * r2241455;
double r2241462 = r2241458 * r2241458;
double r2241463 = r2241461 + r2241462;
double r2241464 = r2241460 / r2241463;
return r2241464;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2241465 = y_re;
double r2241466 = -1.2109434524169916e+96;
bool r2241467 = r2241465 <= r2241466;
double r2241468 = x_im;
double r2241469 = -r2241468;
double r2241470 = y_im;
double r2241471 = r2241465 * r2241465;
double r2241472 = fma(r2241470, r2241470, r2241471);
double r2241473 = sqrt(r2241472);
double r2241474 = r2241469 / r2241473;
double r2241475 = 5.2422713568197025e+36;
bool r2241476 = r2241465 <= r2241475;
double r2241477 = x_re;
double r2241478 = -r2241470;
double r2241479 = r2241477 * r2241478;
double r2241480 = fma(r2241468, r2241465, r2241479);
double r2241481 = r2241480 / r2241473;
double r2241482 = r2241481 / r2241473;
double r2241483 = r2241468 / r2241473;
double r2241484 = r2241476 ? r2241482 : r2241483;
double r2241485 = r2241467 ? r2241474 : r2241484;
return r2241485;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.2109434524169916e+96Initial program 39.0
Simplified39.0
rmApplied add-sqr-sqrt39.0
Applied associate-/r*38.9
Taylor expanded around -inf 38.2
Simplified38.2
if -1.2109434524169916e+96 < y.re < 5.2422713568197025e+36Initial program 18.5
Simplified18.5
rmApplied add-sqr-sqrt18.5
Applied associate-/r*18.4
rmApplied fma-neg18.4
if 5.2422713568197025e+36 < y.re Initial program 34.4
Simplified34.4
rmApplied add-sqr-sqrt34.5
Applied associate-/r*34.4
Taylor expanded around inf 36.1
Final simplification26.2
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))))