Average Error: 0.0 → 0.0
Time: 602.0ms
Precision: 64
\[x.re \cdot y.re - x.im \cdot y.im\]
\[x.re \cdot y.re - x.im \cdot y.im\]
x.re \cdot y.re - x.im \cdot y.im
x.re \cdot y.re - x.im \cdot 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_re) - (x_46_im * y_46_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_re) - (x_46_im * y_46_im));
}

Error

Bits error versus x.re

Bits error versus x.im

Bits error versus y.re

Bits error versus y.im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[x.re \cdot y.re - x.im \cdot y.im\]
  2. Final simplification0.0

    \[\leadsto x.re \cdot y.re - x.im \cdot y.im\]

Reproduce

herbie shell --seed 2020053 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
  :name "_multiplyComplex, real part"
  :precision binary64
  (- (* x.re y.re) (* x.im y.im)))