Average Error: 0.3 → 0.3
Time: 4.7s
Precision: 64
Internal Precision: 320
\[x.re \cdot y.im + x.im \cdot y.re\]
\[x.re \cdot y.im + x.im \cdot y.re\]

Error

Bits error versus x.re

Bits error versus x.im

Bits error versus y.re

Bits error versus y.im

Derivation

  1. Initial program 0.3

    \[\frac{\left(x.re \cdot y.im\right)}{\left(x.im \cdot y.re\right)}\]
  2. Final simplification0.3

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

Reproduce

herbie shell --seed 2019091 
(FPCore (x.re x.im y.re y.im)
  :name "_multiplyComplex, imaginary part"
  (+.p16 (*.p16 x.re y.im) (*.p16 x.im y.re)))