\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 -5.086126503497258 \cdot 10^{+188}:\\
\;\;\;\;\frac{-x.re}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.re \le 6.204871618360054 \cdot 10^{+176}:\\
\;\;\;\;\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 r2461077 = x_re;
double r2461078 = y_re;
double r2461079 = r2461077 * r2461078;
double r2461080 = x_im;
double r2461081 = y_im;
double r2461082 = r2461080 * r2461081;
double r2461083 = r2461079 + r2461082;
double r2461084 = r2461078 * r2461078;
double r2461085 = r2461081 * r2461081;
double r2461086 = r2461084 + r2461085;
double r2461087 = r2461083 / r2461086;
return r2461087;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2461088 = y_re;
double r2461089 = -5.086126503497258e+188;
bool r2461090 = r2461088 <= r2461089;
double r2461091 = x_re;
double r2461092 = -r2461091;
double r2461093 = y_im;
double r2461094 = hypot(r2461093, r2461088);
double r2461095 = r2461092 / r2461094;
double r2461096 = 6.204871618360054e+176;
bool r2461097 = r2461088 <= r2461096;
double r2461098 = x_im;
double r2461099 = r2461093 * r2461098;
double r2461100 = fma(r2461091, r2461088, r2461099);
double r2461101 = r2461100 / r2461094;
double r2461102 = r2461101 / r2461094;
double r2461103 = r2461091 / r2461094;
double r2461104 = r2461097 ? r2461102 : r2461103;
double r2461105 = r2461090 ? r2461095 : r2461104;
return r2461105;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -5.086126503497258e+188Initial program 41.2
Simplified41.2
rmApplied add-sqr-sqrt41.2
Applied associate-/r*41.2
rmApplied clear-num41.2
Simplified29.6
rmApplied associate-/r*29.0
Simplified29.0
Taylor expanded around -inf 12.0
Simplified12.0
if -5.086126503497258e+188 < y.re < 6.204871618360054e+176Initial program 20.9
Simplified20.9
rmApplied add-sqr-sqrt20.9
Applied associate-/r*20.8
rmApplied clear-num21.1
Simplified13.6
rmApplied associate-/r*13.1
Simplified13.0
if 6.204871618360054e+176 < y.re Initial program 44.6
Simplified44.6
rmApplied add-sqr-sqrt44.6
Applied associate-/r*44.6
rmApplied clear-num44.6
Simplified31.9
rmApplied associate-/r*31.4
Simplified31.4
Taylor expanded around inf 12.5
Final simplification12.9
herbie shell --seed 2019162 +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))))