\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 r2028355 = x_im;
double r2028356 = y_re;
double r2028357 = r2028355 * r2028356;
double r2028358 = x_re;
double r2028359 = y_im;
double r2028360 = r2028358 * r2028359;
double r2028361 = r2028357 - r2028360;
double r2028362 = r2028356 * r2028356;
double r2028363 = r2028359 * r2028359;
double r2028364 = r2028362 + r2028363;
double r2028365 = r2028361 / r2028364;
return r2028365;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2028366 = x_im;
double r2028367 = y_re;
double r2028368 = r2028366 * r2028367;
double r2028369 = /*Error: no posit support in C */;
double r2028370 = x_re;
double r2028371 = y_im;
double r2028372 = /*Error: no posit support in C */;
double r2028373 = /*Error: no posit support in C */;
double r2028374 = r2028367 * r2028367;
double r2028375 = /*Error: no posit support in C */;
double r2028376 = /*Error: no posit support in C */;
double r2028377 = /*Error: no posit support in C */;
double r2028378 = r2028373 / r2028377;
return r2028378;
}



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