\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 r2023483 = x_re;
double r2023484 = y_re;
double r2023485 = r2023483 * r2023484;
double r2023486 = x_im;
double r2023487 = y_im;
double r2023488 = r2023486 * r2023487;
double r2023489 = r2023485 + r2023488;
double r2023490 = r2023484 * r2023484;
double r2023491 = r2023487 * r2023487;
double r2023492 = r2023490 + r2023491;
double r2023493 = r2023489 / r2023492;
return r2023493;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2023494 = x_re;
double r2023495 = y_re;
double r2023496 = r2023494 * r2023495;
double r2023497 = /*Error: no posit support in C */;
double r2023498 = x_im;
double r2023499 = y_im;
double r2023500 = /*Error: no posit support in C */;
double r2023501 = /*Error: no posit support in C */;
double r2023502 = r2023495 * r2023495;
double r2023503 = /*Error: no posit support in C */;
double r2023504 = /*Error: no posit support in C */;
double r2023505 = /*Error: no posit support in C */;
double r2023506 = r2023501 / r2023505;
return r2023506;
}



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