Average Error: 0.3 → 0.3
Time: 8.3s
Precision: 64
Internal precision: 128
\[\left(\left(x \cdot 3.0\right) \cdot y\right) \cdot y\]
\[3.0 \cdot \left(\left(y \cdot x\right) \cdot y\right)\]

Error

Bits error versus x

Bits error versus y

Target

Original0.3
Comparison0.2
Herbie0.3
\[ \left(x \cdot \left(3.0 \cdot y\right)\right) \cdot y \]

Derivation

  1. Initial program 0.3

    \[\left(\left(x \cdot 3.0\right) \cdot y\right) \cdot y\]
  2. Applied taylor 0.2

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

    \[\leadsto \color{blue}{\left(3.0 \cdot \left(y \cdot x\right)\right)} \cdot y\]
  4. Using strategy rm
  5. Applied associate-*l* 0.3

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

Runtime

Time bar (total: 8.3s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(1138431714 882738341 2289893908 3489416031 2596002828 1139863188)'
(FPCore (x y)
  :name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, B"

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

  (* (* (* x 3.0) y) y))