Average Error: 0.1 → 0.0
Time: 1.4s
Precision: binary64
\[\left(\left(\left(-x1 \cdot x2\right) - \left(2 \cdot x2\right) \cdot x3\right) - x1\right) - x3\]
\[\left(x2 \cdot \left(\left(-x1\right) - 2 \cdot x3\right) - x3\right) - x1\]

Error

Bits error versus x1

Bits error versus x2

Bits error versus x3

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(-x1 \cdot x2\right) - \left(2 \cdot x2\right) \cdot x3\right) - x1\right) - x3\]
  2. Simplified0.0

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

    \[\leadsto \left(x2 \cdot \left(\left(-x1\right) - 2 \cdot x3\right) - x3\right) - x1\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x1 x2 x3)
  :name "(- (- (- (- (* x1 x2)) (* (* 2 x2) x3)) x1) x3)"
  :precision binary64
  (- (- (- (neg (* x1 x2)) (* (* 2.0 x2) x3)) x1) x3))