\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 -2.06589453177273212 \cdot 10^{130}:\\
\;\;\;\;\frac{-x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \le 7.1823270231744765 \cdot 10^{59}:\\
\;\;\;\;\frac{\frac{1}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{\mathsf{fma}\left(y.re, x.re, y.im \cdot x.im\right)}}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r58282 = x_re;
double r58283 = y_re;
double r58284 = r58282 * r58283;
double r58285 = x_im;
double r58286 = y_im;
double r58287 = r58285 * r58286;
double r58288 = r58284 + r58287;
double r58289 = r58283 * r58283;
double r58290 = r58286 * r58286;
double r58291 = r58289 + r58290;
double r58292 = r58288 / r58291;
return r58292;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r58293 = y_re;
double r58294 = -2.065894531772732e+130;
bool r58295 = r58293 <= r58294;
double r58296 = x_re;
double r58297 = -r58296;
double r58298 = y_im;
double r58299 = hypot(r58293, r58298);
double r58300 = r58297 / r58299;
double r58301 = 7.1823270231744765e+59;
bool r58302 = r58293 <= r58301;
double r58303 = 1.0;
double r58304 = x_im;
double r58305 = r58298 * r58304;
double r58306 = fma(r58293, r58296, r58305);
double r58307 = r58299 / r58306;
double r58308 = r58303 / r58307;
double r58309 = r58308 / r58299;
double r58310 = r58296 / r58299;
double r58311 = r58302 ? r58309 : r58310;
double r58312 = r58295 ? r58300 : r58311;
return r58312;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -2.065894531772732e+130Initial program 44.5
rmApplied add-sqr-sqrt44.5
Applied *-un-lft-identity44.5
Applied times-frac44.5
Simplified44.5
Simplified28.9
rmApplied associate-*r/28.9
Simplified28.8
Taylor expanded around -inf 15.7
Simplified15.7
if -2.065894531772732e+130 < y.re < 7.1823270231744765e+59Initial program 18.9
rmApplied add-sqr-sqrt18.9
Applied *-un-lft-identity18.9
Applied times-frac18.9
Simplified18.9
Simplified11.7
rmApplied associate-*r/11.7
Simplified11.6
rmApplied clear-num11.7
if 7.1823270231744765e+59 < y.re Initial program 37.2
rmApplied add-sqr-sqrt37.2
Applied *-un-lft-identity37.2
Applied times-frac37.2
Simplified37.2
Simplified25.1
rmApplied associate-*r/25.1
Simplified25.1
Taylor expanded around inf 18.5
Final simplification13.7
herbie shell --seed 2020043 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
:precision binary64
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))