\frac{\left(\left(x.im \cdot y.re\right) - \left(x.re \cdot y.im\right)\right)}{\left(\frac{\left(y.re \cdot y.re\right)}{\left(y.im \cdot y.im\right)}\right)}\frac{\left(\mathsf{qms}\left(\left(\left(x.im \cdot y.re\right)\right), x.re, y.im\right)\right)}{\left(\mathsf{qma}\left(\left(\left(y.re \cdot y.re\right)\right), y.im, y.im\right)\right)}double f(double x_re, double x_im, double y_re, double y_im) {
double r3185758 = x_im;
double r3185759 = y_re;
double r3185760 = r3185758 * r3185759;
double r3185761 = x_re;
double r3185762 = y_im;
double r3185763 = r3185761 * r3185762;
double r3185764 = r3185760 - r3185763;
double r3185765 = r3185759 * r3185759;
double r3185766 = r3185762 * r3185762;
double r3185767 = r3185765 + r3185766;
double r3185768 = r3185764 / r3185767;
return r3185768;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r3185769 = x_im;
double r3185770 = y_re;
double r3185771 = r3185769 * r3185770;
double r3185772 = /*Error: no posit support in C */;
double r3185773 = x_re;
double r3185774 = y_im;
double r3185775 = /*Error: no posit support in C */;
double r3185776 = /*Error: no posit support in C */;
double r3185777 = r3185770 * r3185770;
double r3185778 = /*Error: no posit support in C */;
double r3185779 = /*Error: no posit support in C */;
double r3185780 = /*Error: no posit support in C */;
double r3185781 = r3185776 / r3185780;
return r3185781;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Initial program 1.1
rmApplied introduce-quire1.1
Applied insert-quire-fdp-sub1.1
rmApplied introduce-quire1.1
Applied insert-quire-fdp-add1.0
Final simplification1.0
herbie shell --seed 2019142
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, imaginary part"
(/.p16 (-.p16 (*.p16 x.im y.re) (*.p16 x.re y.im)) (+.p16 (*.p16 y.re y.re) (*.p16 y.im y.im))))