Average Error: 0 → 0
Time: 2.2s
Precision: 64
Internal precision: 128
\[\left(x \cdot 2.0\right) \cdot x\]
\[\left(2.0 \cdot x\right) \cdot x\]

Error

Bits error versus x

Target

Original0
Comparison0
Herbie0
\[ \left(2.0 \cdot x\right) \cdot x \]

Derivation

  1. Initial program 0

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

    \[\leadsto \color{blue}{2.0 \cdot {x}^2}\]
  3. Using strategy rm
  4. Applied square-mult 0.0

    \[\leadsto 2.0 \cdot \color{blue}{\left(x \cdot x\right)}\]
  5. Applied associate-*r* 0

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

Runtime

Time bar (total: 2.2s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3837104967 648055641 1161835174 954939584 3929107082 3310272285)'
(FPCore (x)
  :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, A"

  :target
  (* (* 2.0 x) x)

  (* (* x 2.0) x))