\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\begin{array}{l}
\mathbf{if}\;y.re \le -1.8277997780989823 \cdot 10^{+123}:\\
\;\;\;\;\frac{-x.re}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.re \le 1.7195081298008246 \cdot 10^{+221}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{\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 r1520420 = x_re;
double r1520421 = y_re;
double r1520422 = r1520420 * r1520421;
double r1520423 = x_im;
double r1520424 = y_im;
double r1520425 = r1520423 * r1520424;
double r1520426 = r1520422 + r1520425;
double r1520427 = r1520421 * r1520421;
double r1520428 = r1520424 * r1520424;
double r1520429 = r1520427 + r1520428;
double r1520430 = r1520426 / r1520429;
return r1520430;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r1520431 = y_re;
double r1520432 = -1.8277997780989823e+123;
bool r1520433 = r1520431 <= r1520432;
double r1520434 = x_re;
double r1520435 = -r1520434;
double r1520436 = y_im;
double r1520437 = hypot(r1520436, r1520431);
double r1520438 = r1520435 / r1520437;
double r1520439 = 1.7195081298008246e+221;
bool r1520440 = r1520431 <= r1520439;
double r1520441 = x_im;
double r1520442 = r1520436 * r1520441;
double r1520443 = fma(r1520434, r1520431, r1520442);
double r1520444 = r1520443 / r1520437;
double r1520445 = r1520444 / r1520437;
double r1520446 = r1520434 / r1520437;
double r1520447 = r1520440 ? r1520445 : r1520446;
double r1520448 = r1520433 ? r1520438 : r1520447;
return r1520448;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.8277997780989823e+123Initial program 41.5
Simplified41.5
rmApplied add-sqr-sqrt41.5
Applied associate-/r*41.5
rmApplied fma-udef41.5
Applied hypot-def41.5
Taylor expanded around -inf 15.2
Simplified15.2
if -1.8277997780989823e+123 < y.re < 1.7195081298008246e+221Initial program 21.2
Simplified21.2
rmApplied add-sqr-sqrt21.2
Applied associate-/r*21.1
rmApplied fma-udef21.1
Applied hypot-def21.1
rmApplied fma-udef21.1
Applied hypot-def12.8
if 1.7195081298008246e+221 < y.re Initial program 39.1
Simplified39.1
rmApplied add-sqr-sqrt39.1
Applied associate-/r*39.1
rmApplied fma-udef39.1
Applied hypot-def39.1
rmApplied fma-udef39.1
Applied hypot-def29.2
Taylor expanded around inf 9.1
Final simplification12.9
herbie shell --seed 2019151 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))