\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(x.im \cdot \left(x.re - x.im\right)\right) \cdot x.re + \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 r1939564 = x_re;
double r1939565 = r1939564 * r1939564;
double r1939566 = x_im;
double r1939567 = r1939566 * r1939566;
double r1939568 = r1939565 - r1939567;
double r1939569 = r1939568 * r1939564;
double r1939570 = r1939564 * r1939566;
double r1939571 = r1939566 * r1939564;
double r1939572 = r1939570 + r1939571;
double r1939573 = r1939572 * r1939566;
double r1939574 = r1939569 - r1939573;
return r1939574;
}
double f(double x_re, double x_im) {
double r1939575 = x_im;
double r1939576 = x_re;
double r1939577 = r1939576 - r1939575;
double r1939578 = r1939575 * r1939577;
double r1939579 = r1939578 * r1939576;
double r1939580 = r1939576 * r1939576;
double r1939581 = r1939577 * r1939580;
double r1939582 = r1939579 + r1939581;
double r1939583 = /*Error: no posit support in C */;
double r1939584 = r1939576 + r1939576;
double r1939585 = r1939584 * r1939575;
double r1939586 = /*Error: no posit support in C */;
double r1939587 = /*Error: no posit support in C */;
return r1939587;
}



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-rgt-in0.4
rmApplied +p16-rgt-identity-expand0.4
Applied associate-+l+0.4
Simplified0.4
Final simplification0.4
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)))