\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.im \le -1.258889379708196059634998409540390148429 \cdot 10^{166}:\\
\;\;\;\;\frac{-x.im}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.im \le 2.476328044238816658061320815262943904384 \cdot 10^{164}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, y.im, y.re \cdot x.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r2646302 = x_re;
double r2646303 = y_re;
double r2646304 = r2646302 * r2646303;
double r2646305 = x_im;
double r2646306 = y_im;
double r2646307 = r2646305 * r2646306;
double r2646308 = r2646304 + r2646307;
double r2646309 = r2646303 * r2646303;
double r2646310 = r2646306 * r2646306;
double r2646311 = r2646309 + r2646310;
double r2646312 = r2646308 / r2646311;
return r2646312;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2646313 = y_im;
double r2646314 = -1.258889379708196e+166;
bool r2646315 = r2646313 <= r2646314;
double r2646316 = x_im;
double r2646317 = -r2646316;
double r2646318 = y_re;
double r2646319 = hypot(r2646313, r2646318);
double r2646320 = r2646317 / r2646319;
double r2646321 = 2.4763280442388167e+164;
bool r2646322 = r2646313 <= r2646321;
double r2646323 = x_re;
double r2646324 = r2646318 * r2646323;
double r2646325 = fma(r2646316, r2646313, r2646324);
double r2646326 = r2646325 / r2646319;
double r2646327 = 1.0;
double r2646328 = r2646327 / r2646319;
double r2646329 = r2646326 * r2646328;
double r2646330 = r2646316 / r2646319;
double r2646331 = r2646322 ? r2646329 : r2646330;
double r2646332 = r2646315 ? r2646320 : r2646331;
return r2646332;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.im < -1.258889379708196e+166Initial program 45.9
Simplified45.9
rmApplied add-sqr-sqrt45.9
Applied associate-/r*45.9
rmApplied fma-udef45.9
Applied hypot-def45.9
rmApplied *-un-lft-identity45.9
Applied associate-/r*45.9
Simplified29.4
Taylor expanded around -inf 13.0
Simplified13.0
if -1.258889379708196e+166 < y.im < 2.4763280442388167e+164Initial program 20.5
Simplified20.5
rmApplied add-sqr-sqrt20.5
Applied associate-/r*20.4
rmApplied fma-udef20.4
Applied hypot-def20.4
rmApplied *-un-lft-identity20.4
Applied associate-/r*20.4
Simplified13.2
rmApplied div-inv13.3
if 2.4763280442388167e+164 < y.im Initial program 45.3
Simplified45.3
rmApplied add-sqr-sqrt45.3
Applied associate-/r*45.3
rmApplied fma-udef45.3
Applied hypot-def45.3
Taylor expanded around 0 13.0
Final simplification13.2
herbie shell --seed 2019168 +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))))