\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.264168133681399 \cdot 10^{+152}:\\
\;\;\;\;\frac{-x.re}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.re \le 1.4672736653528514 \cdot 10^{+187}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.im, y.im, x.re \cdot y.re\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r1810176 = x_re;
double r1810177 = y_re;
double r1810178 = r1810176 * r1810177;
double r1810179 = x_im;
double r1810180 = y_im;
double r1810181 = r1810179 * r1810180;
double r1810182 = r1810178 + r1810181;
double r1810183 = r1810177 * r1810177;
double r1810184 = r1810180 * r1810180;
double r1810185 = r1810183 + r1810184;
double r1810186 = r1810182 / r1810185;
return r1810186;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r1810187 = y_re;
double r1810188 = -1.264168133681399e+152;
bool r1810189 = r1810187 <= r1810188;
double r1810190 = x_re;
double r1810191 = -r1810190;
double r1810192 = y_im;
double r1810193 = hypot(r1810192, r1810187);
double r1810194 = r1810191 / r1810193;
double r1810195 = 1.4672736653528514e+187;
bool r1810196 = r1810187 <= r1810195;
double r1810197 = x_im;
double r1810198 = r1810190 * r1810187;
double r1810199 = fma(r1810197, r1810192, r1810198);
double r1810200 = r1810199 / r1810193;
double r1810201 = r1810200 / r1810193;
double r1810202 = r1810190 / r1810193;
double r1810203 = r1810196 ? r1810201 : r1810202;
double r1810204 = r1810189 ? r1810194 : r1810203;
return r1810204;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -1.264168133681399e+152Initial program 43.7
Simplified43.7
rmApplied add-sqr-sqrt43.7
Applied associate-/r*43.7
rmApplied fma-udef43.7
Applied hypot-def43.7
rmApplied fma-udef43.7
Applied hypot-def28.2
Taylor expanded around -inf 13.6
Simplified13.6
if -1.264168133681399e+152 < y.re < 1.4672736653528514e+187Initial program 19.9
Simplified19.9
rmApplied add-sqr-sqrt19.9
Applied associate-/r*19.8
rmApplied fma-udef19.8
Applied hypot-def19.8
rmApplied fma-udef19.8
Applied hypot-def12.6
rmApplied *-un-lft-identity12.6
Applied associate-/r*12.6
Simplified12.6
if 1.4672736653528514e+187 < y.re Initial program 42.9
Simplified42.9
rmApplied add-sqr-sqrt42.9
Applied associate-/r*42.9
rmApplied fma-udef42.9
Applied hypot-def42.9
Taylor expanded around inf 11.6
Final simplification12.6
herbie shell --seed 2019135 +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))))