\frac{\left(\frac{\left(x.re \cdot y.re\right)}{\left(x.im \cdot y.im\right)}\right)}{\left(\frac{\left(y.re \cdot y.re\right)}{\left(y.im \cdot y.im\right)}\right)}\frac{\left(\left(\mathsf{qma}\left(\left(\left(x.re \cdot y.re\right)\right), x.im, y.im\right)\right)\right)}{\left(\left(\mathsf{qma}\left(\left(\left(y.re \cdot y.re\right)\right), y.im, y.im\right)\right)\right)}double f(double x_re, double x_im, double y_re, double y_im) {
double r2641366 = x_re;
double r2641367 = y_re;
double r2641368 = r2641366 * r2641367;
double r2641369 = x_im;
double r2641370 = y_im;
double r2641371 = r2641369 * r2641370;
double r2641372 = r2641368 + r2641371;
double r2641373 = r2641367 * r2641367;
double r2641374 = r2641370 * r2641370;
double r2641375 = r2641373 + r2641374;
double r2641376 = r2641372 / r2641375;
return r2641376;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2641377 = x_re;
double r2641378 = y_re;
double r2641379 = r2641377 * r2641378;
double r2641380 = /*Error: no posit support in C */;
double r2641381 = x_im;
double r2641382 = y_im;
double r2641383 = /*Error: no posit support in C */;
double r2641384 = /*Error: no posit support in C */;
double r2641385 = r2641378 * r2641378;
double r2641386 = /*Error: no posit support in C */;
double r2641387 = /*Error: no posit support in C */;
double r2641388 = /*Error: no posit support in C */;
double r2641389 = r2641384 / r2641388;
return r2641389;
}



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-add1.1
rmApplied introduce-quire1.1
Applied insert-quire-fdp-add1.0
Final simplification1.0
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
(/.p16 (+.p16 (*.p16 x.re y.re) (*.p16 x.im y.im)) (+.p16 (*.p16 y.re y.re) (*.p16 y.im y.im))))