\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(\mathsf{qma}\left(\left(\left(x.re \cdot y.re\right)\right), x.im, 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 r4633490 = x_re;
double r4633491 = y_re;
double r4633492 = r4633490 * r4633491;
double r4633493 = x_im;
double r4633494 = y_im;
double r4633495 = r4633493 * r4633494;
double r4633496 = r4633492 + r4633495;
double r4633497 = r4633491 * r4633491;
double r4633498 = r4633494 * r4633494;
double r4633499 = r4633497 + r4633498;
double r4633500 = r4633496 / r4633499;
return r4633500;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r4633501 = x_re;
double r4633502 = y_re;
double r4633503 = r4633501 * r4633502;
double r4633504 = /*Error: no posit support in C */;
double r4633505 = x_im;
double r4633506 = y_im;
double r4633507 = /*Error: no posit support in C */;
double r4633508 = /*Error: no posit support in C */;
double r4633509 = r4633502 * r4633502;
double r4633510 = /*Error: no posit support in C */;
double r4633511 = /*Error: no posit support in C */;
double r4633512 = /*Error: no posit support in C */;
double r4633513 = r4633508 / r4633512;
return r4633513;
}



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