x.re \cdot y.im + x.im \cdot y.re
\mathsf{fma}\left(y.re, x.im, x.re \cdot y.im\right)
(FPCore (x.re x.im y.re y.im) :precision binary64 (+ (* x.re y.im) (* x.im y.re)))
(FPCore (x.re x.im y.re y.im) :precision binary64 (fma y.re x.im (* x.re y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (x_46_re * y_46_im) + (x_46_im * y_46_re);
}
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return fma(y_46_re, x_46_im, (x_46_re * y_46_im));
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Initial program 0.5
Simplified0.3
Taylor expanded in x.re around 0 0.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2022067
(FPCore (x.re x.im y.re y.im)
:name "_multiplyComplex, imaginary part"
:precision binary64
(+ (* x.re y.im) (* x.im y.re)))