Average Error: 6.9 → 0.2
Time: 48.0s
Precision: 64
Ground Truth: 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 + \left(\left(-x.im\right) - \left(x.im + x.im\right)\right) \cdot \left(x.im \cdot x.re\right)\]

Error

Bits error versus x.re

Bits error versus x.im

Derivation

  1. Initial program 6.9

    \[\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 6.9

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

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

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

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

    \[\leadsto \color{blue}{{x.re}^3} + x.re \cdot \left(\left(-x.im \cdot x.im\right) - \left(x.im \cdot x.im + x.im \cdot x.im\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. Removed slow pow expressions

Runtime

Total time: 48.0s Debug log

Please include this information when filing a bug report:

herbie --seed '#(1636415951 1841952857 1251469778 1095052696 2482318079 1874490922)'
(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)))