Average Error: 0.0 → 0.0
Time: 589.0ms
Precision: binary64
\[\left(-2\right) + \left(2 \cdot x\right) \cdot x\]
\[\left(2 \cdot x\right) \cdot x - 2\]

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\left(-2\right) + \left(2 \cdot x\right) \cdot x\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\left(2 \cdot x\right) \cdot x - 2}\]
  3. Final simplification0.0

    \[\leadsto \left(2 \cdot x\right) \cdot x - 2\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x)
  :name "(+ (- 2) (* (* 2 x) x))"
  :precision binary64
  (+ (neg 2.0) (* (* 2.0 x) x)))