\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.im \le -4.434994773334765 \cdot 10^{+162}:\\
\;\;\;\;\frac{-x.im}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.im \le 2.2908775229370544 \cdot 10^{+141}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\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 r2695665 = x_re;
double r2695666 = y_re;
double r2695667 = r2695665 * r2695666;
double r2695668 = x_im;
double r2695669 = y_im;
double r2695670 = r2695668 * r2695669;
double r2695671 = r2695667 + r2695670;
double r2695672 = r2695666 * r2695666;
double r2695673 = r2695669 * r2695669;
double r2695674 = r2695672 + r2695673;
double r2695675 = r2695671 / r2695674;
return r2695675;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2695676 = y_im;
double r2695677 = -4.434994773334765e+162;
bool r2695678 = r2695676 <= r2695677;
double r2695679 = x_im;
double r2695680 = -r2695679;
double r2695681 = y_re;
double r2695682 = hypot(r2695676, r2695681);
double r2695683 = r2695680 / r2695682;
double r2695684 = 2.2908775229370544e+141;
bool r2695685 = r2695676 <= r2695684;
double r2695686 = x_re;
double r2695687 = r2695681 * r2695686;
double r2695688 = fma(r2695676, r2695679, r2695687);
double r2695689 = r2695688 / r2695682;
double r2695690 = r2695689 / r2695682;
double r2695691 = r2695679 / r2695682;
double r2695692 = r2695685 ? r2695690 : r2695691;
double r2695693 = r2695678 ? r2695683 : r2695692;
return r2695693;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.im < -4.434994773334765e+162Initial program 43.3
Simplified43.3
rmApplied add-sqr-sqrt43.3
Applied associate-/r*43.3
rmApplied clear-num43.3
Simplified29.1
rmApplied *-commutative29.1
Applied associate-/r*28.3
Simplified28.3
Taylor expanded around -inf 12.3
Simplified12.3
if -4.434994773334765e+162 < y.im < 2.2908775229370544e+141Initial program 18.8
Simplified18.8
rmApplied add-sqr-sqrt18.8
Applied associate-/r*18.7
rmApplied clear-num19.0
Simplified12.1
rmApplied *-commutative12.1
Applied associate-/r*11.7
Simplified11.6
if 2.2908775229370544e+141 < y.im Initial program 43.5
Simplified43.5
rmApplied add-sqr-sqrt43.5
Applied associate-/r*43.5
rmApplied clear-num43.6
Simplified28.7
rmApplied *-commutative28.7
Applied associate-/r*28.0
Simplified28.0
Taylor expanded around inf 13.5
Final simplification11.9
herbie shell --seed 2019158 +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))))