Average Error: 0.1 → 0.1
Time: 1.2s
Precision: binary64
\[\frac{\left(\left(\left(\left(-f\right) \cdot f\right) \cdot f + \left(3 \cdot f\right) \cdot f\right) - 3 \cdot f\right) + 1}{6}\]
\[\frac{\left(\left(\left(\left(-f\right) \cdot f\right) \cdot f + \left(3 \cdot f\right) \cdot f\right) - 3 \cdot f\right) + 1}{6}\]

Error

Bits error versus f

Derivation

  1. Initial program 0.1

    \[\frac{\left(\left(\left(\left(-f\right) \cdot f\right) \cdot f + \left(3 \cdot f\right) \cdot f\right) - 3 \cdot f\right) + 1}{6}\]
  2. Final simplification0.1

    \[\leadsto \frac{\left(\left(\left(\left(-f\right) \cdot f\right) \cdot f + \left(3 \cdot f\right) \cdot f\right) - 3 \cdot f\right) + 1}{6}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (f)
  :name "(/ (+ (- (+ (* (* (- f) f) f) (* (* 3 f) f)) (* 3 f)) 1) 6)"
  :precision binary64
  (/ (+ (- (+ (* (* (neg f) f) f) (* (* 3.0 f) f)) (* 3.0 f)) 1.0) 6.0))