Average Error: 6.8 → 0.2
Time: 50.2s
Precision: 64
Internal Precision: 320
\[\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(x.im \cdot 3\right) \cdot \left(x.im \cdot x.re\right)\]

Error

Bits error versus x.re

Bits error versus x.im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 6.8

    \[\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 simplify6.8

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

    \[\leadsto \color{blue}{{x.re}^{3} - 3 \cdot \left(x.re \cdot {x.im}^{2}\right)}\]
  4. Using strategy rm
  5. Applied unpow26.8

    \[\leadsto {x.re}^{3} - 3 \cdot \left(x.re \cdot \color{blue}{\left(x.im \cdot x.im\right)}\right)\]
  6. Applied associate-*r*0.2

    \[\leadsto {x.re}^{3} - 3 \cdot \color{blue}{\left(\left(x.re \cdot x.im\right) \cdot x.im\right)}\]
  7. Taylor expanded around -inf 62.6

    \[\leadsto \color{blue}{e^{3 \cdot \left(\log -1 - \log \left(\frac{-1}{x.re}\right)\right)} - 3 \cdot \left(x.re \cdot {x.im}^{2}\right)}\]
  8. Applied simplify0.2

    \[\leadsto \color{blue}{{x.re}^{3} - \left(x.im \cdot 3\right) \cdot \left(x.im \cdot x.re\right)}\]

Runtime

Time bar (total: 50.2s)Debug logProfile

herbie shell --seed '#(1072967564 1937075727 894099792 790700740 1036514779 1027793188)' +o rules:numerics
(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)))