Average Error: 0.0 → 0.0
Time: 1.6s
Precision: 64
Internal Precision: 128
\[x.re \cdot y.im + x.im \cdot y.re\]
\[(y.re \cdot x.im + \left(y.im \cdot x.re\right))_*\]

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.0

    \[x.re \cdot y.im + x.im \cdot y.re\]
  2. Simplified0.0

    \[\leadsto \color{blue}{(x.re \cdot y.im + \left(x.im \cdot y.re\right))_*}\]
  3. Taylor expanded around -inf 0.0

    \[\leadsto \color{blue}{y.re \cdot x.im + y.im \cdot x.re}\]
  4. Simplified0.0

    \[\leadsto \color{blue}{(y.re \cdot x.im + \left(y.im \cdot x.re\right))_*}\]
  5. Final simplification0.0

    \[\leadsto (y.re \cdot x.im + \left(y.im \cdot x.re\right))_*\]

Reproduce

herbie shell --seed 2019072 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
  :name "_multiplyComplex, imaginary part"
  (+ (* x.re y.im) (* x.im y.re)))