Average Error: 6.7 → 0.2
Time: 24.5s
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(x.im \cdot x.re\right) \cdot (x.im \cdot 2 + 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. Applied simplify0.2

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

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

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

Runtime

Time bar (total: 24.5s)Debug logProfile

herbie shell --seed '#(1070227846 1561819246 480764335 4016816270 2602869839 2117310382)' +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)))