Average Error: 6.6 → 0.2
Time: 1.2m
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} - (x.im \cdot 2 + x.im)_* \cdot \left(x.im \cdot x.re\right)\]

Error

Bits error versus x.re

Bits error versus x.im

Derivation

  1. Initial program 6.6

    \[\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. Taylor expanded around 0 6.6

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

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

Runtime

Time bar (total: 1.2m)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' +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)))