\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 -2.045846669237430472528864761609559364154 \cdot 10^{123}:\\
\;\;\;\;\frac{-x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \le 8.747123436813267982750810114699097243072 \cdot 10^{191}:\\
\;\;\;\;\frac{\frac{1}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.re}}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r4760094 = x_re;
double r4760095 = y_re;
double r4760096 = r4760094 * r4760095;
double r4760097 = x_im;
double r4760098 = y_im;
double r4760099 = r4760097 * r4760098;
double r4760100 = r4760096 + r4760099;
double r4760101 = r4760095 * r4760095;
double r4760102 = r4760098 * r4760098;
double r4760103 = r4760101 + r4760102;
double r4760104 = r4760100 / r4760103;
return r4760104;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r4760105 = y_re;
double r4760106 = -2.0458466692374305e+123;
bool r4760107 = r4760105 <= r4760106;
double r4760108 = x_re;
double r4760109 = -r4760108;
double r4760110 = y_im;
double r4760111 = hypot(r4760105, r4760110);
double r4760112 = r4760109 / r4760111;
double r4760113 = 8.747123436813268e+191;
bool r4760114 = r4760105 <= r4760113;
double r4760115 = 1.0;
double r4760116 = x_im;
double r4760117 = r4760116 * r4760110;
double r4760118 = fma(r4760108, r4760105, r4760117);
double r4760119 = r4760111 / r4760118;
double r4760120 = r4760115 / r4760119;
double r4760121 = r4760120 / r4760111;
double r4760122 = r4760111 / r4760108;
double r4760123 = r4760115 / r4760122;
double r4760124 = r4760114 ? r4760121 : r4760123;
double r4760125 = r4760107 ? r4760112 : r4760124;
return r4760125;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -2.0458466692374305e+123Initial program 41.2
Simplified41.2
rmApplied add-sqr-sqrt41.2
Applied associate-/r*41.1
rmApplied clear-num41.2
Simplified28.4
rmApplied associate-/r/28.5
Applied associate-/r*27.8
Taylor expanded around -inf 14.5
Simplified14.5
if -2.0458466692374305e+123 < y.re < 8.747123436813268e+191Initial program 21.4
Simplified21.4
rmApplied add-sqr-sqrt21.4
Applied associate-/r*21.4
rmApplied clear-num21.6
Simplified13.7
rmApplied associate-/r/13.7
Applied associate-/r*13.3
if 8.747123436813268e+191 < y.re Initial program 43.0
Simplified43.0
rmApplied add-sqr-sqrt43.0
Applied associate-/r*43.0
rmApplied clear-num43.0
Simplified30.9
Taylor expanded around inf 13.1
Final simplification13.5
herbie shell --seed 2019174 +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))))