\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.92809702332723783 \cdot 10^{94}:\\
\;\;\;\;\frac{-1 \cdot x.im}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 3.85849841677322835 \cdot 10^{39}:\\
\;\;\;\;\frac{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 4.0740961827290516 \cdot 10^{154}:\\
\;\;\;\;\frac{x.im}{\frac{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}{y.re}} - \frac{x.re}{\frac{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}{y.im}}\\
\mathbf{elif}\;y.re \le 5.21434504503365728 \cdot 10^{171}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r68369 = x_im;
double r68370 = y_re;
double r68371 = r68369 * r68370;
double r68372 = x_re;
double r68373 = y_im;
double r68374 = r68372 * r68373;
double r68375 = r68371 - r68374;
double r68376 = r68370 * r68370;
double r68377 = r68373 * r68373;
double r68378 = r68376 + r68377;
double r68379 = r68375 / r68378;
return r68379;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r68380 = y_re;
double r68381 = -1.928097023327238e+94;
bool r68382 = r68380 <= r68381;
double r68383 = -1.0;
double r68384 = x_im;
double r68385 = r68383 * r68384;
double r68386 = y_im;
double r68387 = hypot(r68380, r68386);
double r68388 = 1.0;
double r68389 = r68387 * r68388;
double r68390 = r68385 / r68389;
double r68391 = 3.8584984167732284e+39;
bool r68392 = r68380 <= r68391;
double r68393 = r68384 * r68380;
double r68394 = x_re;
double r68395 = r68394 * r68386;
double r68396 = r68393 - r68395;
double r68397 = r68396 / r68387;
double r68398 = r68397 / r68389;
double r68399 = 4.0740961827290516e+154;
bool r68400 = r68380 <= r68399;
double r68401 = r68386 * r68386;
double r68402 = fma(r68380, r68380, r68401);
double r68403 = r68402 / r68380;
double r68404 = r68384 / r68403;
double r68405 = r68402 / r68386;
double r68406 = r68394 / r68405;
double r68407 = r68404 - r68406;
double r68408 = 5.214345045033657e+171;
bool r68409 = r68380 <= r68408;
double r68410 = r68387 / r68397;
double r68411 = r68388 / r68410;
double r68412 = r68384 / r68389;
double r68413 = r68409 ? r68411 : r68412;
double r68414 = r68400 ? r68407 : r68413;
double r68415 = r68392 ? r68398 : r68414;
double r68416 = r68382 ? r68390 : r68415;
return r68416;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.928097023327238e+94Initial program 38.9
rmApplied add-sqr-sqrt38.9
Applied *-un-lft-identity38.9
Applied times-frac38.9
Simplified38.9
Simplified27.2
rmApplied associate-*l/27.2
Simplified27.2
Taylor expanded around -inf 17.1
if -1.928097023327238e+94 < y.re < 3.8584984167732284e+39Initial program 18.3
rmApplied add-sqr-sqrt18.4
Applied *-un-lft-identity18.4
Applied times-frac18.4
Simplified18.4
Simplified11.4
rmApplied associate-*l/11.3
Simplified11.3
if 3.8584984167732284e+39 < y.re < 4.0740961827290516e+154Initial program 22.2
rmApplied div-sub22.2
Simplified14.3
Simplified14.5
if 4.0740961827290516e+154 < y.re < 5.214345045033657e+171Initial program 54.0
rmApplied add-sqr-sqrt54.0
Applied *-un-lft-identity54.0
Applied times-frac54.0
Simplified54.0
Simplified21.9
rmApplied associate-*l/21.8
Simplified21.8
rmApplied clear-num22.4
Simplified22.4
if 5.214345045033657e+171 < y.re Initial program 45.5
rmApplied add-sqr-sqrt45.5
Applied *-un-lft-identity45.5
Applied times-frac45.5
Simplified45.5
Simplified31.4
rmApplied associate-*l/31.4
Simplified31.4
Taylor expanded around inf 13.6
Final simplification13.1
herbie shell --seed 2020083 +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))))