\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 r1689318 = x_im;
double r1689319 = y_re;
double r1689320 = r1689318 * r1689319;
double r1689321 = x_re;
double r1689322 = y_im;
double r1689323 = r1689321 * r1689322;
double r1689324 = r1689320 - r1689323;
double r1689325 = r1689319 * r1689319;
double r1689326 = r1689322 * r1689322;
double r1689327 = r1689325 + r1689326;
double r1689328 = r1689324 / r1689327;
return r1689328;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r1689329 = x_im;
double r1689330 = y_re;
double r1689331 = r1689329 * r1689330;
double r1689332 = /*Error: no posit support in C */;
double r1689333 = x_re;
double r1689334 = y_im;
double r1689335 = /*Error: no posit support in C */;
double r1689336 = /*Error: no posit support in C */;
double r1689337 = r1689330 * r1689330;
double r1689338 = /*Error: no posit support in C */;
double r1689339 = /*Error: no posit support in C */;
double r1689340 = /*Error: no posit support in C */;
double r1689341 = r1689336 / r1689340;
return r1689341;
}



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