\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.676220666344615615802840188676763171273 \cdot 10^{75}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 1.27854918231393790515454488962691098663 \cdot 10^{162}:\\
\;\;\;\;\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 r66990 = x_re;
double r66991 = y_re;
double r66992 = r66990 * r66991;
double r66993 = x_im;
double r66994 = y_im;
double r66995 = r66993 * r66994;
double r66996 = r66992 + r66995;
double r66997 = r66991 * r66991;
double r66998 = r66994 * r66994;
double r66999 = r66997 + r66998;
double r67000 = r66996 / r66999;
return r67000;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r67001 = y_re;
double r67002 = -1.6762206663446156e+75;
bool r67003 = r67001 <= r67002;
double r67004 = -1.0;
double r67005 = x_re;
double r67006 = r67004 * r67005;
double r67007 = y_im;
double r67008 = hypot(r67001, r67007);
double r67009 = 1.0;
double r67010 = r67008 * r67009;
double r67011 = r67006 / r67010;
double r67012 = 1.278549182313938e+162;
bool r67013 = r67001 <= r67012;
double r67014 = x_im;
double r67015 = r67014 * r67007;
double r67016 = fma(r67005, r67001, r67015);
double r67017 = r67016 / r67008;
double r67018 = r67017 / r67010;
double r67019 = r67005 / r67010;
double r67020 = r67013 ? r67018 : r67019;
double r67021 = r67003 ? r67011 : r67020;
return r67021;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.6762206663446156e+75Initial program 36.7
rmApplied add-sqr-sqrt36.7
Applied *-un-lft-identity36.7
Applied times-frac36.7
Simplified36.7
Simplified24.6
rmApplied associate-*r/24.6
Simplified24.5
Taylor expanded around -inf 17.0
if -1.6762206663446156e+75 < y.re < 1.278549182313938e+162Initial program 19.8
rmApplied add-sqr-sqrt19.8
Applied *-un-lft-identity19.8
Applied times-frac19.8
Simplified19.8
Simplified12.3
rmApplied associate-*r/12.2
Simplified12.1
if 1.278549182313938e+162 < y.re Initial program 45.5
rmApplied add-sqr-sqrt45.5
Applied *-un-lft-identity45.5
Applied times-frac45.5
Simplified45.5
Simplified31.0
rmApplied associate-*r/31.0
Simplified31.0
Taylor expanded around inf 13.9
Final simplification13.3
herbie shell --seed 2020001 +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))))