\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\begin{array}{l}
\mathbf{if}\;y.re \le -8.156571467291585296848265053911461752012 \cdot 10^{143}:\\
\;\;\;\;\frac{-x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \le 1.514468218294920189983723932644127325328 \cdot 10^{69}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.im, y.re, -y.im \cdot x.re\right)}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r68228 = x_im;
double r68229 = y_re;
double r68230 = r68228 * r68229;
double r68231 = x_re;
double r68232 = y_im;
double r68233 = r68231 * r68232;
double r68234 = r68230 - r68233;
double r68235 = r68229 * r68229;
double r68236 = r68232 * r68232;
double r68237 = r68235 + r68236;
double r68238 = r68234 / r68237;
return r68238;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r68239 = y_re;
double r68240 = -8.156571467291585e+143;
bool r68241 = r68239 <= r68240;
double r68242 = x_im;
double r68243 = -r68242;
double r68244 = y_im;
double r68245 = hypot(r68239, r68244);
double r68246 = r68243 / r68245;
double r68247 = 1.5144682182949202e+69;
bool r68248 = r68239 <= r68247;
double r68249 = x_re;
double r68250 = r68244 * r68249;
double r68251 = -r68250;
double r68252 = fma(r68242, r68239, r68251);
double r68253 = r68252 / r68245;
double r68254 = r68253 / r68245;
double r68255 = r68242 / r68245;
double r68256 = r68248 ? r68254 : r68255;
double r68257 = r68241 ? r68246 : r68256;
return r68257;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -8.156571467291585e+143Initial program 44.8
rmApplied add-sqr-sqrt44.8
Applied *-un-lft-identity44.8
Applied times-frac44.8
Simplified44.8
Simplified29.5
rmApplied associate-*r/29.5
Simplified29.4
Taylor expanded around -inf 14.9
Simplified14.9
if -8.156571467291585e+143 < y.re < 1.5144682182949202e+69Initial program 18.6
rmApplied add-sqr-sqrt18.6
Applied *-un-lft-identity18.6
Applied times-frac18.6
Simplified18.6
Simplified11.9
rmApplied associate-*r/11.9
Simplified11.8
if 1.5144682182949202e+69 < y.re Initial program 36.9
rmApplied add-sqr-sqrt36.9
Applied *-un-lft-identity36.9
Applied times-frac36.9
Simplified36.9
Simplified24.8
rmApplied associate-*r/24.7
Simplified24.7
Taylor expanded around inf 16.6
Final simplification13.2
herbie shell --seed 2019350 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, imaginary part"
:precision binary64
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))