\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 r1814483 = x_im;
double r1814484 = y_re;
double r1814485 = r1814483 * r1814484;
double r1814486 = x_re;
double r1814487 = y_im;
double r1814488 = r1814486 * r1814487;
double r1814489 = r1814485 - r1814488;
double r1814490 = r1814484 * r1814484;
double r1814491 = r1814487 * r1814487;
double r1814492 = r1814490 + r1814491;
double r1814493 = r1814489 / r1814492;
return r1814493;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r1814494 = x_im;
double r1814495 = y_re;
double r1814496 = r1814494 * r1814495;
double r1814497 = /*Error: no posit support in C */;
double r1814498 = x_re;
double r1814499 = y_im;
double r1814500 = /*Error: no posit support in C */;
double r1814501 = /*Error: no posit support in C */;
double r1814502 = r1814495 * r1814495;
double r1814503 = /*Error: no posit support in C */;
double r1814504 = /*Error: no posit support in C */;
double r1814505 = /*Error: no posit support in C */;
double r1814506 = r1814501 / r1814505;
return r1814506;
}



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