Average Error: 7.2 → 0.3
Time: 47.1s
Precision: 64
Internal Precision: 384
\[\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re\]
\[(\left(-x.im\right) \cdot \left(x.im \cdot x.im\right) + \left(\left(x.im \cdot x.re\right) \cdot (x.re \cdot 2 + x.re)_*\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.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re\]
  2. Applied simplify0.2

    \[\leadsto \color{blue}{(\left(x.re - x.im\right) \cdot \left(\left(x.re + x.im\right) \cdot x.im\right) + \left(\left(x.re + x.re\right) \cdot \left(x.re \cdot x.im\right)\right))_*}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.6

    \[\leadsto (\left(x.re - x.im\right) \cdot \left(\left(x.re + x.im\right) \cdot x.im\right) + \left(\color{blue}{\left(\left(\sqrt[3]{x.re + x.re} \cdot \sqrt[3]{x.re + x.re}\right) \cdot \sqrt[3]{x.re + x.re}\right)} \cdot \left(x.re \cdot x.im\right)\right))_*\]
  5. Applied associate-*l*0.6

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

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

    \[\leadsto \color{blue}{(\left(-x.im\right) \cdot \left(x.im \cdot x.im\right) + \left(\left(x.im \cdot x.re\right) \cdot (x.re \cdot 2 + x.re)_*\right))_*}\]

Runtime

Time bar (total: 47.1s)Debug logProfile

herbie shell --seed '#(1070386091 2509006183 1430610344 1025408621 36622005 1425925650)' +o rules:numerics
(FPCore (x.re x.im)
  :name "math.cube on complex, imaginary part"
  (+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))