Average Error: 0.0 → 1.0
Time: 30.4s
Precision: 64
Internal Precision: 320
\[x.re \cdot y.re - x.im \cdot y.im\]
\[\frac{x.im \cdot y.im + x.re \cdot y.re}{\frac{x.im \cdot y.im + x.re \cdot y.re}{x.re \cdot y.re - x.im \cdot y.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. Using strategy rm
  3. Applied flip--25.3

    \[\leadsto \color{blue}{\frac{\left(x.re \cdot y.re\right) \cdot \left(x.re \cdot y.re\right) - \left(x.im \cdot y.im\right) \cdot \left(x.im \cdot y.im\right)}{x.re \cdot y.re + x.im \cdot y.im}}\]
  4. Using strategy rm
  5. Applied difference-of-squares25.2

    \[\leadsto \frac{\color{blue}{\left(x.re \cdot y.re + x.im \cdot y.im\right) \cdot \left(x.re \cdot y.re - x.im \cdot y.im\right)}}{x.re \cdot y.re + x.im \cdot y.im}\]
  6. Applied associate-/l*1.0

    \[\leadsto \color{blue}{\frac{x.re \cdot y.re + x.im \cdot y.im}{\frac{x.re \cdot y.re + x.im \cdot y.im}{x.re \cdot y.re - x.im \cdot y.im}}}\]
  7. Final simplification1.0

    \[\leadsto \frac{x.im \cdot y.im + x.re \cdot y.re}{\frac{x.im \cdot y.im + x.re \cdot y.re}{x.re \cdot y.re - x.im \cdot y.im}}\]

Runtime

Time bar (total: 30.4s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes1.01.00.01.00%
herbie shell --seed 2018285 
(FPCore (x.re x.im y.re y.im)
  :name "_multiplyComplex, real part"
  (- (* x.re y.re) (* x.im y.im)))