\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.3620016266644103 \cdot 10^{136}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 9.0120164940071816 \cdot 10^{142}:\\
\;\;\;\;\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) \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 r66423 = x_re;
double r66424 = y_re;
double r66425 = r66423 * r66424;
double r66426 = x_im;
double r66427 = y_im;
double r66428 = r66426 * r66427;
double r66429 = r66425 + r66428;
double r66430 = r66424 * r66424;
double r66431 = r66427 * r66427;
double r66432 = r66430 + r66431;
double r66433 = r66429 / r66432;
return r66433;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r66434 = y_re;
double r66435 = -1.3620016266644103e+136;
bool r66436 = r66434 <= r66435;
double r66437 = -1.0;
double r66438 = x_re;
double r66439 = r66437 * r66438;
double r66440 = y_im;
double r66441 = hypot(r66434, r66440);
double r66442 = 1.0;
double r66443 = r66441 * r66442;
double r66444 = r66439 / r66443;
double r66445 = 9.012016494007182e+142;
bool r66446 = r66434 <= r66445;
double r66447 = x_im;
double r66448 = r66447 * r66440;
double r66449 = fma(r66438, r66434, r66448);
double r66450 = r66441 / r66449;
double r66451 = r66442 / r66450;
double r66452 = r66451 / r66443;
double r66453 = r66438 / r66443;
double r66454 = r66446 ? r66452 : r66453;
double r66455 = r66436 ? r66444 : r66454;
return r66455;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.3620016266644103e+136Initial program 42.5
rmApplied add-sqr-sqrt42.5
Applied *-un-lft-identity42.5
Applied times-frac42.5
Simplified42.5
Simplified28.1
rmApplied associate-*r/28.1
Simplified28.1
Taylor expanded around -inf 13.3
if -1.3620016266644103e+136 < y.re < 9.012016494007182e+142Initial program 19.0
rmApplied add-sqr-sqrt19.0
Applied *-un-lft-identity19.0
Applied times-frac19.0
Simplified19.0
Simplified11.5
rmApplied associate-*r/11.5
Simplified11.4
rmApplied clear-num11.4
if 9.012016494007182e+142 < y.re Initial program 44.2
rmApplied add-sqr-sqrt44.2
Applied *-un-lft-identity44.2
Applied times-frac44.2
Simplified44.2
Simplified29.4
rmApplied associate-*r/29.4
Simplified29.3
Taylor expanded around inf 15.0
Final simplification12.2
herbie shell --seed 2020100 +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))))