\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.im \leq 1.7331516180898825 \cdot 10^{+56}:\\
\;\;\;\;\frac{\frac{x.re \cdot y.re + y.im \cdot x.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\sqrt{y.re \cdot y.re + y.im \cdot y.im}}\\
\end{array}double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (((double) (((double) (x_46_re * y_46_re)) + ((double) (x_46_im * y_46_im)))) / ((double) (((double) (y_46_re * y_46_re)) + ((double) (y_46_im * y_46_im)))));
}
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double VAR;
if ((y_46_im <= 1.7331516180898825e+56)) {
VAR = ((((double) (((double) (x_46_re * y_46_re)) + ((double) (y_46_im * x_46_im)))) / ((double) sqrt(((double) (((double) (y_46_re * y_46_re)) + ((double) (y_46_im * y_46_im))))))) / ((double) sqrt(((double) (((double) (y_46_re * y_46_re)) + ((double) (y_46_im * y_46_im)))))));
} else {
VAR = (x_46_im / ((double) sqrt(((double) (((double) (y_46_re * y_46_re)) + ((double) (y_46_im * y_46_im)))))));
}
return VAR;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
if y.im < 1.73315161808988254e56Initial program Error: 23.3 bits
rmApplied add-sqr-sqrtError: 23.3 bits
Applied associate-/r*Error: 23.2 bits
if 1.73315161808988254e56 < y.im Initial program Error: 36.0 bits
rmApplied add-sqr-sqrtError: 36.0 bits
Applied associate-/r*Error: 36.0 bits
Taylor expanded around 0 Error: 36.5 bits
Final simplificationError: 26.1 bits
herbie shell --seed 2020200
(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))))