\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 -1.822953805089044376553202188560045343306 \cdot 10^{171}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 6.189704792038334664960750005457753271594 \cdot 10^{149}:\\
\;\;\;\;\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 r126442 = x_re;
double r126443 = y_re;
double r126444 = r126442 * r126443;
double r126445 = x_im;
double r126446 = y_im;
double r126447 = r126445 * r126446;
double r126448 = r126444 + r126447;
double r126449 = r126443 * r126443;
double r126450 = r126446 * r126446;
double r126451 = r126449 + r126450;
double r126452 = r126448 / r126451;
return r126452;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r126453 = y_re;
double r126454 = -1.8229538050890444e+171;
bool r126455 = r126453 <= r126454;
double r126456 = -1.0;
double r126457 = x_re;
double r126458 = r126456 * r126457;
double r126459 = y_im;
double r126460 = hypot(r126453, r126459);
double r126461 = 1.0;
double r126462 = r126460 * r126461;
double r126463 = r126458 / r126462;
double r126464 = 6.189704792038335e+149;
bool r126465 = r126453 <= r126464;
double r126466 = x_im;
double r126467 = r126466 * r126459;
double r126468 = fma(r126457, r126453, r126467);
double r126469 = r126468 / r126460;
double r126470 = r126469 / r126462;
double r126471 = r126457 / r126462;
double r126472 = r126465 ? r126470 : r126471;
double r126473 = r126455 ? r126463 : r126472;
return r126473;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.8229538050890444e+171Initial program 43.8
rmApplied add-sqr-sqrt43.8
Applied *-un-lft-identity43.8
Applied times-frac43.8
Simplified43.8
Simplified30.5
rmApplied associate-*r/30.5
Simplified30.4
Taylor expanded around -inf 12.8
if -1.8229538050890444e+171 < y.re < 6.189704792038335e+149Initial program 20.3
rmApplied add-sqr-sqrt20.3
Applied *-un-lft-identity20.3
Applied times-frac20.3
Simplified20.3
Simplified13.5
rmApplied associate-*r/13.4
Simplified13.4
if 6.189704792038335e+149 < y.re Initial program 43.8
rmApplied add-sqr-sqrt43.8
Applied *-un-lft-identity43.8
Applied times-frac43.8
Simplified43.8
Simplified29.8
rmApplied associate-*r/29.8
Simplified29.8
Taylor expanded around inf 13.3
Final simplification13.3
herbie shell --seed 2019344 +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))))