Average Error: 0.0 → 0.0
Time: 8.5s
Precision: 64
Internal precision: 128
\[2.0 \cdot \left(x \cdot x + x \cdot y\right)\]
\[\left(x \cdot 2.0\right) \cdot \left(y + x\right)\]

Error

Bits error versus x

Bits error versus y

Target

Original0.0
Comparison0.0
Herbie0.0
\[ \left(x \cdot 2.0\right) \cdot \left(x + y\right) \]

Derivation

  1. Initial program 0.0

    \[2.0 \cdot \left(x \cdot x + x \cdot y\right)\]
  2. Applied simplify 0.0

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

Runtime

Time bar (total: 8.5s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3073383454 2419305942 1658042008 3006391673 1777804948 719974007)'
(FPCore (x y)
  :name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, B"

  :target
  (* (* x 2.0) (+ x y))

  (* 2.0 (+ (* x x) (* x y))))