\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.196029180194929582144198890230617428217 \cdot 10^{122}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 7.737953068228604549699963321087727002991 \cdot 10^{125}:\\
\;\;\;\;\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 r68300 = x_re;
double r68301 = y_re;
double r68302 = r68300 * r68301;
double r68303 = x_im;
double r68304 = y_im;
double r68305 = r68303 * r68304;
double r68306 = r68302 + r68305;
double r68307 = r68301 * r68301;
double r68308 = r68304 * r68304;
double r68309 = r68307 + r68308;
double r68310 = r68306 / r68309;
return r68310;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r68311 = y_re;
double r68312 = -1.1960291801949296e+122;
bool r68313 = r68311 <= r68312;
double r68314 = -1.0;
double r68315 = x_re;
double r68316 = r68314 * r68315;
double r68317 = y_im;
double r68318 = hypot(r68311, r68317);
double r68319 = 1.0;
double r68320 = r68318 * r68319;
double r68321 = r68316 / r68320;
double r68322 = 7.737953068228605e+125;
bool r68323 = r68311 <= r68322;
double r68324 = x_im;
double r68325 = r68324 * r68317;
double r68326 = fma(r68315, r68311, r68325);
double r68327 = r68326 / r68318;
double r68328 = r68327 / r68320;
double r68329 = r68315 / r68320;
double r68330 = r68323 ? r68328 : r68329;
double r68331 = r68313 ? r68321 : r68330;
return r68331;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.1960291801949296e+122Initial program 41.0
rmApplied add-sqr-sqrt41.0
Applied *-un-lft-identity41.0
Applied times-frac41.0
Simplified41.0
Simplified27.4
rmApplied associate-*r/27.4
Simplified27.4
Taylor expanded around -inf 14.6
if -1.1960291801949296e+122 < y.re < 7.737953068228605e+125Initial program 18.7
rmApplied add-sqr-sqrt18.7
Applied *-un-lft-identity18.7
Applied times-frac18.7
Simplified18.7
Simplified11.8
rmApplied associate-*r/11.8
Simplified11.7
if 7.737953068228605e+125 < y.re Initial program 43.7
rmApplied add-sqr-sqrt43.7
Applied *-un-lft-identity43.7
Applied times-frac43.7
Simplified43.7
Simplified28.5
rmApplied associate-*r/28.5
Simplified28.4
Taylor expanded around inf 16.7
Final simplification12.9
herbie shell --seed 2019346 +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))))