\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 r1177599 = x_re;
double r1177600 = y_re;
double r1177601 = r1177599 * r1177600;
double r1177602 = x_im;
double r1177603 = y_im;
double r1177604 = r1177602 * r1177603;
double r1177605 = r1177601 + r1177604;
double r1177606 = r1177600 * r1177600;
double r1177607 = r1177603 * r1177603;
double r1177608 = r1177606 + r1177607;
double r1177609 = r1177605 / r1177608;
return r1177609;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r1177610 = y_re;
double r1177611 = -1.8277997780989823e+123;
bool r1177612 = r1177610 <= r1177611;
double r1177613 = x_re;
double r1177614 = -r1177613;
double r1177615 = y_im;
double r1177616 = hypot(r1177615, r1177610);
double r1177617 = r1177614 / r1177616;
double r1177618 = 1.7195081298008246e+221;
bool r1177619 = r1177610 <= r1177618;
double r1177620 = x_im;
double r1177621 = r1177615 * r1177620;
double r1177622 = fma(r1177613, r1177610, r1177621);
double r1177623 = r1177622 / r1177616;
double r1177624 = r1177623 / r1177616;
double r1177625 = r1177613 / r1177616;
double r1177626 = r1177619 ? r1177624 : r1177625;
double r1177627 = r1177612 ? r1177617 : r1177626;
return r1177627;
}



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
rmApplied fma-udef41.5
Applied hypot-def27.3
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
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))))