\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}-\frac{\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.re}} - \frac{x.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}}}{-\mathsf{hypot}\left(y.re, y.im\right)}double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((double) (((double) (((double) (x_46_im * y_46_re)) - ((double) (x_46_re * 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) {
return ((double) -(((double) (((double) (((double) (x_46_im / ((double) (((double) hypot(y_46_re, y_46_im)) / y_46_re)))) - ((double) (x_46_re / ((double) (((double) hypot(y_46_re, y_46_im)) / y_46_im)))))) / ((double) -(((double) hypot(y_46_re, y_46_im))))))));
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
Initial program 26.1
rmApplied add-sqr-sqrt26.1
Applied *-un-lft-identity26.1
Applied times-frac26.1
Simplified26.1
Simplified16.7
rmApplied div-sub16.7
Simplified9.2
Simplified0.6
rmApplied frac-2neg0.6
Applied associate-*l/0.4
Final simplification0.4
herbie shell --seed 2020113 +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))))