\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 -4.1536238602847571 \cdot 10^{76}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 1.7187819587037017 \cdot 10^{178}:\\
\;\;\;\;\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 r59943 = x_re;
double r59944 = y_re;
double r59945 = r59943 * r59944;
double r59946 = x_im;
double r59947 = y_im;
double r59948 = r59946 * r59947;
double r59949 = r59945 + r59948;
double r59950 = r59944 * r59944;
double r59951 = r59947 * r59947;
double r59952 = r59950 + r59951;
double r59953 = r59949 / r59952;
return r59953;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r59954 = y_re;
double r59955 = -4.153623860284757e+76;
bool r59956 = r59954 <= r59955;
double r59957 = -1.0;
double r59958 = x_re;
double r59959 = r59957 * r59958;
double r59960 = y_im;
double r59961 = hypot(r59954, r59960);
double r59962 = 1.0;
double r59963 = r59961 * r59962;
double r59964 = r59959 / r59963;
double r59965 = 1.7187819587037017e+178;
bool r59966 = r59954 <= r59965;
double r59967 = x_im;
double r59968 = r59967 * r59960;
double r59969 = fma(r59958, r59954, r59968);
double r59970 = r59969 / r59961;
double r59971 = r59970 / r59963;
double r59972 = r59958 / r59963;
double r59973 = r59966 ? r59971 : r59972;
double r59974 = r59956 ? r59964 : r59973;
return r59974;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -4.153623860284757e+76Initial program 38.7
rmApplied add-sqr-sqrt38.7
Applied *-un-lft-identity38.7
Applied times-frac38.7
Simplified38.7
Simplified26.7
rmApplied associate-*r/26.7
Simplified26.6
Taylor expanded around -inf 18.0
if -4.153623860284757e+76 < y.re < 1.7187819587037017e+178Initial program 20.0
rmApplied add-sqr-sqrt20.0
Applied *-un-lft-identity20.0
Applied times-frac20.0
Simplified20.0
Simplified12.6
rmApplied associate-*r/12.6
Simplified12.5
if 1.7187819587037017e+178 < y.re Initial program 45.1
rmApplied add-sqr-sqrt45.1
Applied *-un-lft-identity45.1
Applied times-frac45.1
Simplified45.1
Simplified31.0
rmApplied associate-*r/31.0
Simplified30.9
Taylor expanded around inf 14.4
Final simplification13.8
herbie shell --seed 2020027 +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))))