Average Error: 6.8 → 0.5
Time: 53.0s
Precision: 64
Internal Precision: 320
\[\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.re - x.im\right) \cdot \left(\left(x.re + x.im\right) \cdot x.im\right) + \left(\left(\sqrt[3]{\left(x.re + x.re\right) \cdot \left(x.re \cdot x.im\right)} \cdot \sqrt[3]{\left(x.re + x.re\right) \cdot \left(x.re \cdot x.im\right)}\right) \cdot \sqrt[3]{\left(x.re + x.re\right) \cdot \left(x.re \cdot x.im\right)}\right))_*\]

Error

Bits error versus x.re

Bits error versus x.im

Derivation

  1. Initial program 6.8

    \[\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.5

    \[\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]{\left(x.re + x.re\right) \cdot \left(x.re \cdot x.im\right)} \cdot \sqrt[3]{\left(x.re + x.re\right) \cdot \left(x.re \cdot x.im\right)}\right) \cdot \sqrt[3]{\left(x.re + x.re\right) \cdot \left(x.re \cdot x.im\right)}\right)})_*\]

Runtime

Time bar (total: 53.0s)Debug logProfile

herbie shell --seed 2018206 +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)))