Average Error: 6.7 → 0.2
Time: 2.4m
Precision: 64
Internal Precision: 384
\[\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(\frac{x.im + x.im}{\frac{1}{x.re}} + x.re \cdot x.im\right) \cdot x.im\]

Error

Bits error versus x.re

Bits error versus x.im

Derivation

  1. Initial program 6.7

    \[\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. Using strategy rm
  3. Applied difference-of-squares6.7

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

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

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

    \[\leadsto \left(x.re + x.im\right) \cdot \left(\left(x.re - x.im\right) \cdot x.re\right) - \color{blue}{\left(\sqrt[3]{x.re \cdot x.im + x.im \cdot x.re} \cdot \sqrt[3]{x.re \cdot x.im + x.im \cdot x.re}\right) \cdot \left(\sqrt[3]{x.re \cdot x.im + x.im \cdot x.re} \cdot x.im\right)}\]
  8. Applied simplify0.6

    \[\leadsto \left(x.re + x.im\right) \cdot \left(\left(x.re - x.im\right) \cdot x.re\right) - \left(\sqrt[3]{x.re \cdot x.im + x.im \cdot x.re} \cdot \sqrt[3]{x.re \cdot x.im + x.im \cdot x.re}\right) \cdot \color{blue}{\left(\sqrt[3]{\left(x.re + x.re\right) \cdot x.im} \cdot x.im\right)}\]
  9. Taylor expanded around inf 49.2

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

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

Runtime

Time bar (total: 2.4m)Debug logProfile

herbie shell --seed '#(1064397287 3527694221 3797617954 1138343853 2854031332 1153838279)' 
(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)))