\left(\left(\left(x.re \cdot x.re\right) - \left(x.im \cdot x.im\right)\right) \cdot x.re\right) - \left(\left(\frac{\left(x.re \cdot x.im\right)}{\left(x.im \cdot x.re\right)}\right) \cdot x.im\right)\left(\mathsf{qms}\left(\left(\left(\left(\left(\left(x.re \cdot \left(x.im + x.re\right)\right) \cdot \left(x.re - x.im\right)\right)\right)\right)\right), \left(\left(x.re + x.re\right) \cdot x.im\right), x.im\right)\right)double f(double x_re, double x_im) {
double r1984596 = x_re;
double r1984597 = r1984596 * r1984596;
double r1984598 = x_im;
double r1984599 = r1984598 * r1984598;
double r1984600 = r1984597 - r1984599;
double r1984601 = r1984600 * r1984596;
double r1984602 = r1984596 * r1984598;
double r1984603 = r1984598 * r1984596;
double r1984604 = r1984602 + r1984603;
double r1984605 = r1984604 * r1984598;
double r1984606 = r1984601 - r1984605;
return r1984606;
}
double f(double x_re, double x_im) {
double r1984607 = x_re;
double r1984608 = x_im;
double r1984609 = r1984608 + r1984607;
double r1984610 = r1984607 * r1984609;
double r1984611 = r1984607 - r1984608;
double r1984612 = r1984610 * r1984611;
double r1984613 = /*Error: no posit support in C */;
double r1984614 = /*Error: no posit support in C */;
double r1984615 = /*Error: no posit support in C */;
double r1984616 = r1984607 + r1984607;
double r1984617 = r1984616 * r1984608;
double r1984618 = /*Error: no posit support in C */;
double r1984619 = /*Error: no posit support in C */;
return r1984619;
}



Bits error versus x.re



Bits error versus x.im
Initial program 0.4
rmApplied introduce-quire0.4
Applied insert-quire-fdp-sub0.3
Simplified0.3
rmApplied associate-*l*0.3
rmApplied distribute-lft-in0.3
Applied distribute-rgt-in0.4
rmApplied introduce-quire0.4
Simplified0.3
Final simplification0.3
herbie shell --seed 2019162
(FPCore (x.re x.im)
:name "math.cube on complex, real part"
(-.p16 (*.p16 (-.p16 (*.p16 x.re x.re) (*.p16 x.im x.im)) x.re) (*.p16 (+.p16 (*.p16 x.re x.im) (*.p16 x.im x.re)) x.im)))