\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 -3.0757333618448412 \cdot 10^{183}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 4.35189948757554904 \cdot 10^{105}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r101402 = x_re;
double r101403 = y_re;
double r101404 = r101402 * r101403;
double r101405 = x_im;
double r101406 = y_im;
double r101407 = r101405 * r101406;
double r101408 = r101404 + r101407;
double r101409 = r101403 * r101403;
double r101410 = r101406 * r101406;
double r101411 = r101409 + r101410;
double r101412 = r101408 / r101411;
return r101412;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r101413 = y_re;
double r101414 = -3.075733361844841e+183;
bool r101415 = r101413 <= r101414;
double r101416 = -1.0;
double r101417 = x_re;
double r101418 = r101416 * r101417;
double r101419 = y_im;
double r101420 = hypot(r101413, r101419);
double r101421 = 1.0;
double r101422 = r101420 * r101421;
double r101423 = r101418 / r101422;
double r101424 = 4.351899487575549e+105;
bool r101425 = r101413 <= r101424;
double r101426 = x_im;
double r101427 = r101426 * r101419;
double r101428 = fma(r101417, r101413, r101427);
double r101429 = r101428 / r101420;
double r101430 = r101429 / r101422;
double r101431 = r101417 / r101422;
double r101432 = r101425 ? r101430 : r101431;
double r101433 = r101415 ? r101423 : r101432;
return r101433;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -3.075733361844841e+183Initial program 44.4
rmApplied add-sqr-sqrt44.4
Applied *-un-lft-identity44.4
Applied times-frac44.4
Simplified44.4
Simplified29.2
rmApplied associate-*r/29.2
Simplified29.2
Taylor expanded around -inf 12.0
if -3.075733361844841e+183 < y.re < 4.351899487575549e+105Initial program 20.3
rmApplied add-sqr-sqrt20.3
Applied *-un-lft-identity20.3
Applied times-frac20.4
Simplified20.4
Simplified12.7
rmApplied associate-*r/12.7
Simplified12.6
if 4.351899487575549e+105 < y.re Initial program 41.0
rmApplied add-sqr-sqrt41.0
Applied *-un-lft-identity41.0
Applied times-frac41.0
Simplified41.0
Simplified28.8
rmApplied associate-*r/28.8
Simplified28.7
Taylor expanded around inf 16.6
Final simplification13.3
herbie shell --seed 2020018 +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))))