\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 -2.052205868896771 \cdot 10^{+142}:\\
\;\;\;\;\frac{-x.im}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.im \le 6.134295887350108 \cdot 10^{+151}:\\
\;\;\;\;\frac{\frac{1}{\frac{\mathsf{hypot}\left(y.im, y.re\right)}{\mathsf{fma}\left(x.im, y.im, y.re \cdot x.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 r2172927 = x_re;
double r2172928 = y_re;
double r2172929 = r2172927 * r2172928;
double r2172930 = x_im;
double r2172931 = y_im;
double r2172932 = r2172930 * r2172931;
double r2172933 = r2172929 + r2172932;
double r2172934 = r2172928 * r2172928;
double r2172935 = r2172931 * r2172931;
double r2172936 = r2172934 + r2172935;
double r2172937 = r2172933 / r2172936;
return r2172937;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2172938 = y_im;
double r2172939 = -2.052205868896771e+142;
bool r2172940 = r2172938 <= r2172939;
double r2172941 = x_im;
double r2172942 = -r2172941;
double r2172943 = y_re;
double r2172944 = hypot(r2172938, r2172943);
double r2172945 = r2172942 / r2172944;
double r2172946 = 6.134295887350108e+151;
bool r2172947 = r2172938 <= r2172946;
double r2172948 = 1.0;
double r2172949 = x_re;
double r2172950 = r2172943 * r2172949;
double r2172951 = fma(r2172941, r2172938, r2172950);
double r2172952 = r2172944 / r2172951;
double r2172953 = r2172948 / r2172952;
double r2172954 = r2172953 / r2172944;
double r2172955 = r2172941 / r2172944;
double r2172956 = r2172947 ? r2172954 : r2172955;
double r2172957 = r2172940 ? r2172945 : r2172956;
return r2172957;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.im < -2.052205868896771e+142Initial program 44.1
Simplified44.1
rmApplied add-sqr-sqrt44.1
Applied associate-/r*44.1
rmApplied clear-num44.1
Simplified29.8
rmApplied associate-/r/29.8
Applied associate-/r*29.1
Taylor expanded around -inf 13.3
Simplified13.3
if -2.052205868896771e+142 < y.im < 6.134295887350108e+151Initial program 18.9
Simplified18.9
rmApplied add-sqr-sqrt18.9
Applied associate-/r*18.8
rmApplied clear-num19.1
Simplified12.6
rmApplied associate-/r/12.6
Applied associate-/r*12.2
if 6.134295887350108e+151 < y.im Initial program 44.5
Simplified44.5
rmApplied add-sqr-sqrt44.5
Applied associate-/r*44.5
rmApplied clear-num44.5
Simplified29.2
rmApplied associate-/r/29.2
Applied associate-/r*28.6
Taylor expanded around inf 13.0
Final simplification12.5
herbie shell --seed 2019144 +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))))