\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(x.re \cdot \left(x.im \cdot \left(x.re - x.im\right)\right) + \left(x.re - x.im\right) \cdot \left(x.re \cdot x.re\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 r2064728 = x_re;
double r2064729 = r2064728 * r2064728;
double r2064730 = x_im;
double r2064731 = r2064730 * r2064730;
double r2064732 = r2064729 - r2064731;
double r2064733 = r2064732 * r2064728;
double r2064734 = r2064728 * r2064730;
double r2064735 = r2064730 * r2064728;
double r2064736 = r2064734 + r2064735;
double r2064737 = r2064736 * r2064730;
double r2064738 = r2064733 - r2064737;
return r2064738;
}
double f(double x_re, double x_im) {
double r2064739 = x_re;
double r2064740 = x_im;
double r2064741 = r2064739 - r2064740;
double r2064742 = r2064740 * r2064741;
double r2064743 = r2064739 * r2064742;
double r2064744 = r2064739 * r2064739;
double r2064745 = r2064741 * r2064744;
double r2064746 = r2064743 + r2064745;
double r2064747 = /*Error: no posit support in C */;
double r2064748 = r2064739 + r2064739;
double r2064749 = r2064748 * r2064740;
double r2064750 = /*Error: no posit support in C */;
double r2064751 = /*Error: no posit support in C */;
return r2064751;
}



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-rgt-in0.3
Applied distribute-lft-in0.4
rmApplied +p16-rgt-identity-expand0.4
Applied distribute-lft-in0.4
Applied distribute-lft-in0.4
Applied associate-+l+0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019162 +o rules:numerics
(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)))