\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.77697139995080395 \cdot 10^{155}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 3.559188999299462 \cdot 10^{84}:\\
\;\;\;\;\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 r109430 = x_re;
double r109431 = y_re;
double r109432 = r109430 * r109431;
double r109433 = x_im;
double r109434 = y_im;
double r109435 = r109433 * r109434;
double r109436 = r109432 + r109435;
double r109437 = r109431 * r109431;
double r109438 = r109434 * r109434;
double r109439 = r109437 + r109438;
double r109440 = r109436 / r109439;
return r109440;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r109441 = y_re;
double r109442 = -3.776971399950804e+155;
bool r109443 = r109441 <= r109442;
double r109444 = -1.0;
double r109445 = x_re;
double r109446 = r109444 * r109445;
double r109447 = y_im;
double r109448 = hypot(r109441, r109447);
double r109449 = 1.0;
double r109450 = r109448 * r109449;
double r109451 = r109446 / r109450;
double r109452 = 3.559188999299462e+84;
bool r109453 = r109441 <= r109452;
double r109454 = x_im;
double r109455 = r109454 * r109447;
double r109456 = fma(r109445, r109441, r109455);
double r109457 = r109456 / r109448;
double r109458 = r109457 / r109450;
double r109459 = r109445 / r109450;
double r109460 = r109453 ? r109458 : r109459;
double r109461 = r109443 ? r109451 : r109460;
return r109461;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -3.776971399950804e+155Initial program 45.9
rmApplied add-sqr-sqrt45.9
Applied *-un-lft-identity45.9
Applied times-frac45.9
Simplified45.9
Simplified28.9
rmApplied associate-*r/28.9
Simplified28.9
Taylor expanded around -inf 14.2
if -3.776971399950804e+155 < y.re < 3.559188999299462e+84Initial program 18.7
rmApplied add-sqr-sqrt18.7
Applied *-un-lft-identity18.7
Applied times-frac18.7
Simplified18.7
Simplified11.7
rmApplied associate-*r/11.7
Simplified11.6
if 3.559188999299462e+84 < y.re Initial program 39.4
rmApplied add-sqr-sqrt39.4
Applied *-un-lft-identity39.4
Applied times-frac39.4
Simplified39.4
Simplified26.8
rmApplied associate-*r/26.8
Simplified26.8
Taylor expanded around inf 17.6
Final simplification13.1
herbie shell --seed 2020056 +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))))