\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 -7.72381449609585197339080432829350912947 \cdot 10^{66}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 2.28477586604815435652148617808763730008 \cdot 10^{70}:\\
\;\;\;\;\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 r44217 = x_re;
double r44218 = y_re;
double r44219 = r44217 * r44218;
double r44220 = x_im;
double r44221 = y_im;
double r44222 = r44220 * r44221;
double r44223 = r44219 + r44222;
double r44224 = r44218 * r44218;
double r44225 = r44221 * r44221;
double r44226 = r44224 + r44225;
double r44227 = r44223 / r44226;
return r44227;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r44228 = y_re;
double r44229 = -7.723814496095852e+66;
bool r44230 = r44228 <= r44229;
double r44231 = -1.0;
double r44232 = x_re;
double r44233 = r44231 * r44232;
double r44234 = y_im;
double r44235 = hypot(r44228, r44234);
double r44236 = 1.0;
double r44237 = r44235 * r44236;
double r44238 = r44233 / r44237;
double r44239 = 2.2847758660481544e+70;
bool r44240 = r44228 <= r44239;
double r44241 = x_im;
double r44242 = r44241 * r44234;
double r44243 = fma(r44232, r44228, r44242);
double r44244 = r44243 / r44235;
double r44245 = r44244 / r44237;
double r44246 = r44232 / r44237;
double r44247 = r44240 ? r44245 : r44246;
double r44248 = r44230 ? r44238 : r44247;
return r44248;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -7.723814496095852e+66Initial program 36.2
rmApplied add-sqr-sqrt36.2
Applied *-un-lft-identity36.2
Applied times-frac36.2
Simplified36.2
Simplified24.1
rmApplied associate-*r/24.1
Simplified24.0
Taylor expanded around -inf 18.2
if -7.723814496095852e+66 < y.re < 2.2847758660481544e+70Initial program 18.0
rmApplied add-sqr-sqrt18.0
Applied *-un-lft-identity18.0
Applied times-frac18.0
Simplified18.0
Simplified10.6
rmApplied associate-*r/10.5
Simplified10.5
if 2.2847758660481544e+70 < y.re Initial program 37.9
rmApplied add-sqr-sqrt37.9
Applied *-un-lft-identity37.9
Applied times-frac37.9
Simplified37.9
Simplified25.3
rmApplied associate-*r/25.3
Simplified25.2
Taylor expanded around inf 18.1
Final simplification13.6
herbie shell --seed 2019353 +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))))