Average Error: 7.0 → 0.3
Time: 46.4s
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.0

    \[\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) + \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.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]{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 36.0

    \[\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: 46.4s)Debug logProfile

herbie shell --seed '#(1070960995 739739648 2531964651 3069671617 351857262 3877178482)' +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)))