\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 r1763524 = x_re;
double r1763525 = y_re;
double r1763526 = r1763524 * r1763525;
double r1763527 = x_im;
double r1763528 = y_im;
double r1763529 = r1763527 * r1763528;
double r1763530 = r1763526 + r1763529;
double r1763531 = r1763525 * r1763525;
double r1763532 = r1763528 * r1763528;
double r1763533 = r1763531 + r1763532;
double r1763534 = r1763530 / r1763533;
return r1763534;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r1763535 = x_re;
double r1763536 = y_re;
double r1763537 = r1763535 * r1763536;
double r1763538 = /*Error: no posit support in C */;
double r1763539 = x_im;
double r1763540 = y_im;
double r1763541 = /*Error: no posit support in C */;
double r1763542 = /*Error: no posit support in C */;
double r1763543 = r1763536 * r1763536;
double r1763544 = /*Error: no posit support in C */;
double r1763545 = /*Error: no posit support in C */;
double r1763546 = /*Error: no posit support in C */;
double r1763547 = r1763542 / r1763546;
return r1763547;
}



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.1
Final simplification1.1
herbie shell --seed 2019164
(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))))