Average Error: 7.2 → 0.2
Time: 24.3s
Precision: 64
Internal precision: 128
\[\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.re - \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.im\]
\[{x.re}^3 + x.im \cdot \left(\left(-1 - 2\right) \cdot \left(x.im \cdot x.re\right)\right)\]

Error

Bits error versus x.re

Bits error versus x.im

Derivation

  1. Initial program 7.2

    \[\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.re - \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.im\]
  2. Applied simplify 7.2

    \[\leadsto \color{blue}{x.re \cdot \left(\left({x.re}^2 - {x.im}^2\right) - \left({x.im}^2 + {x.im}^2\right)\right)}\]
  3. Using strategy rm
  4. Applied sub-neg 7.2

    \[\leadsto x.re \cdot \left(\color{blue}{\left({x.re}^2 + \left(-{x.im}^2\right)\right)} - \left({x.im}^2 + {x.im}^2\right)\right)\]
  5. Applied associate--l+ 7.2

    \[\leadsto x.re \cdot \color{blue}{\left({x.re}^2 + \left(\left(-{x.im}^2\right) - \left({x.im}^2 + {x.im}^2\right)\right)\right)}\]
  6. Applied distribute-lft-in 7.2

    \[\leadsto \color{blue}{x.re \cdot {x.re}^2 + x.re \cdot \left(\left(-{x.im}^2\right) - \left({x.im}^2 + {x.im}^2\right)\right)}\]
  7. Applied simplify 7.2

    \[\leadsto \color{blue}{{x.re}^3} + x.re \cdot \left(\left(-{x.im}^2\right) - \left({x.im}^2 + {x.im}^2\right)\right)\]
  8. Applied simplify 0.2

    \[\leadsto {x.re}^3 + \color{blue}{\left(\left(-x.im\right) - \left(x.im + x.im\right)\right) \cdot \left(x.im \cdot x.re\right)}\]
  9. Using strategy rm
  10. Applied sum-double 0.2

    \[\leadsto {x.re}^3 + \left(\left(-x.im\right) - \color{blue}{2 \cdot x.im}\right) \cdot \left(x.im \cdot x.re\right)\]
  11. Applied neg-mul-1 0.2

    \[\leadsto {x.re}^3 + \left(\color{blue}{-1 \cdot x.im} - 2 \cdot x.im\right) \cdot \left(x.im \cdot x.re\right)\]
  12. Applied distribute-rgt-out-- 0.2

    \[\leadsto {x.re}^3 + \color{blue}{\left(x.im \cdot \left(-1 - 2\right)\right)} \cdot \left(x.im \cdot x.re\right)\]
  13. Applied associate-*l* 0.2

    \[\leadsto {x.re}^3 + \color{blue}{x.im \cdot \left(\left(-1 - 2\right) \cdot \left(x.im \cdot x.re\right)\right)}\]
  14. Removed slow pow expressions

Runtime

Time bar (total: 24.3s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(4188566362 4096629102 3810407274 2107639644 1067777747 162609325)'
(FPCore (x.re x.im)
  :name "math.cube on complex, real part"
  (- (* (- (* x.re x.re) (* x.im x.im)) x.re) (* (+ (* x.re x.im) (* x.im x.re)) x.im)))