Average Error: 10.1 → 0.3
Time: 22.6s
Precision: 64
Internal Precision: 384
\[\left(\left(x \cdot 3.0\right) \cdot x\right) \cdot y\]
\[x \cdot \left(3.0 \cdot \left(x \cdot y\right)\right)\]

Error

Bits error versus x

Bits error versus y

Target

Original10.1
Target0.3
Herbie0.3
\[\left(x \cdot 3.0\right) \cdot \left(x \cdot y\right)\]

Derivation

  1. Initial program 10.1

    \[\left(\left(x \cdot 3.0\right) \cdot x\right) \cdot y\]
  2. Using strategy rm
  3. Applied associate-*l*0.3

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

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

Runtime

Time bar (total: 22.6s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x y)
  :name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, A"

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

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