\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 7.643741764178763599768402058466858347704 \cdot 10^{138}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(y.re, x.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{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot x.re\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r2451474 = x_re;
double r2451475 = y_re;
double r2451476 = r2451474 * r2451475;
double r2451477 = x_im;
double r2451478 = y_im;
double r2451479 = r2451477 * r2451478;
double r2451480 = r2451476 + r2451479;
double r2451481 = r2451475 * r2451475;
double r2451482 = r2451478 * r2451478;
double r2451483 = r2451481 + r2451482;
double r2451484 = r2451480 / r2451483;
return r2451484;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2451485 = y_re;
double r2451486 = 7.643741764178764e+138;
bool r2451487 = r2451485 <= r2451486;
double r2451488 = x_re;
double r2451489 = y_im;
double r2451490 = x_im;
double r2451491 = r2451489 * r2451490;
double r2451492 = fma(r2451485, r2451488, r2451491);
double r2451493 = hypot(r2451489, r2451485);
double r2451494 = r2451492 / r2451493;
double r2451495 = r2451494 / r2451493;
double r2451496 = 1.0;
double r2451497 = r2451496 / r2451493;
double r2451498 = r2451497 * r2451488;
double r2451499 = r2451487 ? r2451495 : r2451498;
return r2451499;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < 7.643741764178764e+138Initial program 23.2
Simplified23.2
rmApplied clear-num23.4
rmApplied *-un-lft-identity23.4
Applied add-sqr-sqrt23.4
Applied times-frac23.4
Applied add-cube-cbrt23.4
Applied times-frac23.3
Simplified23.3
Simplified15.1
rmApplied associate-*r/15.1
Simplified15.0
if 7.643741764178764e+138 < y.re Initial program 42.3
Simplified42.3
rmApplied clear-num42.3
rmApplied *-un-lft-identity42.3
Applied add-sqr-sqrt42.3
Applied times-frac42.3
Applied add-cube-cbrt42.3
Applied times-frac42.3
Simplified42.3
Simplified28.9
Taylor expanded around 0 13.9
Final simplification14.8
herbie shell --seed 2019192 +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))))