\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 r2376636 = x_im;
double r2376637 = y_re;
double r2376638 = r2376636 * r2376637;
double r2376639 = x_re;
double r2376640 = y_im;
double r2376641 = r2376639 * r2376640;
double r2376642 = r2376638 - r2376641;
double r2376643 = r2376637 * r2376637;
double r2376644 = r2376640 * r2376640;
double r2376645 = r2376643 + r2376644;
double r2376646 = r2376642 / r2376645;
return r2376646;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2376647 = x_im;
double r2376648 = y_re;
double r2376649 = r2376647 * r2376648;
double r2376650 = /*Error: no posit support in C */;
double r2376651 = x_re;
double r2376652 = y_im;
double r2376653 = /*Error: no posit support in C */;
double r2376654 = /*Error: no posit support in C */;
double r2376655 = r2376648 * r2376648;
double r2376656 = /*Error: no posit support in C */;
double r2376657 = /*Error: no posit support in C */;
double r2376658 = /*Error: no posit support in C */;
double r2376659 = r2376654 / r2376658;
return r2376659;
}



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 2019158
(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))))