Average Error: 0.2 → 0.1
Time: 26.1s
Precision: 64
Internal Precision: 384
\[\left(x \cdot x\right) \cdot \left(3.0 - x \cdot 2.0\right)\]
\[\left(x \cdot x\right) \cdot 3.0 + \left(-2.0\right) \cdot {x}^{3}\]

Error

Bits error versus x

Target

Original0.2
Target0.2
Herbie0.1
\[x \cdot \left(x \cdot \left(3.0 - x \cdot 2.0\right)\right)\]

Derivation

  1. Initial program 0.2

    \[\left(x \cdot x\right) \cdot \left(3.0 - x \cdot 2.0\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.2

    \[\leadsto \left(x \cdot x\right) \cdot \color{blue}{\left(3.0 + \left(-x \cdot 2.0\right)\right)}\]
  4. Applied distribute-lft-in0.2

    \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot 3.0 + \left(x \cdot x\right) \cdot \left(-x \cdot 2.0\right)}\]
  5. Applied simplify0.1

    \[\leadsto \left(x \cdot x\right) \cdot 3.0 + \color{blue}{\left(-2.0\right) \cdot {x}^{3}}\]
  6. Removed slow pow expressions.

Runtime

Time bar (total: 26.1s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x)
  :name "Data.Spline.Key:interpolateKeys from smoothie-0.4.0.2"

  :herbie-target
  (* x (* x (- 3.0 (* x 2.0))))

  (* (* x x) (- 3.0 (* x 2.0))))