Average Error: 0.1 → 0.1
Time: 9.2s
Precision: 64
Internal precision: 128
\[\left(x \cdot 3.0\right) \cdot y - z\]
\[3.0 \cdot \left(y \cdot x\right) - z\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original0.1
Comparison0.1
Herbie0.1
\[ x \cdot \left(3.0 \cdot y\right) - z \]

Derivation

  1. Initial program 0.1

    \[\left(x \cdot 3.0\right) \cdot y - z\]
  2. Applied taylor 0.1

    \[\leadsto 3.0 \cdot \left(y \cdot x\right) - z\]
  3. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{3.0 \cdot \left(y \cdot x\right)} - z\]
  4. Removed slow pow expressions

Runtime

Time bar (total: 9.2s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3359387885 3111911182 3691427433 969480075 3199086780 1519275792)'
(FPCore (x y z)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, B"

  :target
  (- (* x (* 3.0 y)) z)

  (- (* (* x 3.0) y) z))