Average Error: 7.4 → 0.2
Time: 2.6s
Precision: binary64
\[\]
\[\]

Error

Bits error versus x.re

Bits error versus x.im

Target

Original7.4
Target0.2
Herbie0.2
\[\]

Derivation

  1. Initial program 7.4

    \[\]
  2. Using strategy rm
  3. Applied difference-of-squares7.4

    \[\leadsto \]
  4. Applied associate-*l*0.2

    \[\leadsto \]
  5. Simplified0.2

    \[\leadsto \]
  6. Using strategy rm
  7. Applied sub-neg0.2

    \[\leadsto \]
  8. Applied distribute-lft-in0.2

    \[\leadsto \]
  9. Applied distribute-lft-in0.3

    \[\leadsto \]
  10. Applied associate--l+0.3

    \[\leadsto \]
  11. Simplified0.2

    \[\leadsto \]
  12. Final simplification0.2

    \[\leadsto \]

Reproduce

herbie shell --seed 2020180 
(FPCore (x.re x.im)
  :name "math.cube on complex, real part"
  :precision binary64

  :herbie-target
  (+ (* (* x.re x.re) (- x.re x.im)) (* (* x.re x.im) (- x.re (* 3.0 x.im))))

  (- (* (- (* x.re x.re) (* x.im x.im)) x.re) (* (+ (* x.re x.im) (* x.im x.re)) x.im)))