\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.942116530425900725431758127434894134157 \cdot 10^{195}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 4.355931456769410941675116004628825267272 \cdot 10^{151}:\\
\;\;\;\;\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 r68562 = x_re;
double r68563 = y_re;
double r68564 = r68562 * r68563;
double r68565 = x_im;
double r68566 = y_im;
double r68567 = r68565 * r68566;
double r68568 = r68564 + r68567;
double r68569 = r68563 * r68563;
double r68570 = r68566 * r68566;
double r68571 = r68569 + r68570;
double r68572 = r68568 / r68571;
return r68572;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r68573 = y_re;
double r68574 = -3.9421165304259007e+195;
bool r68575 = r68573 <= r68574;
double r68576 = -1.0;
double r68577 = x_re;
double r68578 = r68576 * r68577;
double r68579 = y_im;
double r68580 = hypot(r68573, r68579);
double r68581 = 1.0;
double r68582 = r68580 * r68581;
double r68583 = r68578 / r68582;
double r68584 = 4.355931456769411e+151;
bool r68585 = r68573 <= r68584;
double r68586 = x_im;
double r68587 = r68586 * r68579;
double r68588 = fma(r68577, r68573, r68587);
double r68589 = r68588 / r68580;
double r68590 = r68589 / r68582;
double r68591 = r68577 / r68582;
double r68592 = r68585 ? r68590 : r68591;
double r68593 = r68575 ? r68583 : r68592;
return r68593;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -3.9421165304259007e+195Initial program 43.4
rmApplied add-sqr-sqrt43.4
Applied *-un-lft-identity43.4
Applied times-frac43.4
Simplified43.4
Simplified31.4
rmApplied associate-*r/31.4
Simplified31.4
Taylor expanded around -inf 12.9
if -3.9421165304259007e+195 < y.re < 4.355931456769411e+151Initial program 20.9
rmApplied add-sqr-sqrt21.0
Applied *-un-lft-identity21.0
Applied times-frac21.0
Simplified21.0
Simplified13.5
rmApplied associate-*r/13.4
Simplified13.3
if 4.355931456769411e+151 < y.re Initial program 44.3
rmApplied add-sqr-sqrt44.3
Applied *-un-lft-identity44.3
Applied times-frac44.3
Simplified44.3
Simplified28.6
rmApplied associate-*r/28.6
Simplified28.6
Taylor expanded around inf 13.9
Final simplification13.4
herbie shell --seed 2019354 +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))))