\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 -6.75150761769019798 \cdot 10^{142}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 1.8955542797321017 \cdot 10^{121}:\\
\;\;\;\;\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 r114278 = x_re;
double r114279 = y_re;
double r114280 = r114278 * r114279;
double r114281 = x_im;
double r114282 = y_im;
double r114283 = r114281 * r114282;
double r114284 = r114280 + r114283;
double r114285 = r114279 * r114279;
double r114286 = r114282 * r114282;
double r114287 = r114285 + r114286;
double r114288 = r114284 / r114287;
return r114288;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r114289 = y_re;
double r114290 = -6.751507617690198e+142;
bool r114291 = r114289 <= r114290;
double r114292 = -1.0;
double r114293 = x_re;
double r114294 = r114292 * r114293;
double r114295 = y_im;
double r114296 = hypot(r114289, r114295);
double r114297 = 1.0;
double r114298 = r114296 * r114297;
double r114299 = r114294 / r114298;
double r114300 = 1.8955542797321017e+121;
bool r114301 = r114289 <= r114300;
double r114302 = x_im;
double r114303 = r114302 * r114295;
double r114304 = fma(r114293, r114289, r114303);
double r114305 = r114304 / r114296;
double r114306 = r114305 / r114298;
double r114307 = r114293 / r114298;
double r114308 = r114301 ? r114306 : r114307;
double r114309 = r114291 ? r114299 : r114308;
return r114309;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -6.751507617690198e+142Initial program 43.0
rmApplied add-sqr-sqrt43.0
Applied *-un-lft-identity43.0
Applied times-frac43.0
Simplified43.0
Simplified28.4
rmApplied associate-*r/28.4
Simplified28.3
Taylor expanded around -inf 12.8
if -6.751507617690198e+142 < y.re < 1.8955542797321017e+121Initial program 19.3
rmApplied add-sqr-sqrt19.3
Applied *-un-lft-identity19.3
Applied times-frac19.3
Simplified19.3
Simplified12.7
rmApplied associate-*r/12.7
Simplified12.6
if 1.8955542797321017e+121 < y.re Initial program 41.9
rmApplied add-sqr-sqrt41.9
Applied *-un-lft-identity41.9
Applied times-frac41.9
Simplified41.9
Simplified27.9
rmApplied associate-*r/27.9
Simplified27.8
Taylor expanded around inf 14.7
Final simplification13.0
herbie shell --seed 2020047 +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))))