Average Error: 2.4 → 2.4
Time: 2.8s
Precision: binary64
\[\left(1 - \cos x\right) \cdot {x}^{2} - \left(-timeout\right) \cdot 10\]
\[timeout \cdot 10 + \left(1 - \cos x\right) \cdot {x}^{2}\]

Error

Bits error versus x

Bits error versus timeout

Derivation

  1. Initial program 2.4

    \[\left(1 - \cos x\right) \cdot {x}^{2} - \left(-timeout\right) \cdot 10\]
  2. Simplified2.4

    \[\leadsto \color{blue}{timeout \cdot 10 + \left(1 - \cos x\right) \cdot {x}^{2}}\]
  3. Final simplification2.4

    \[\leadsto timeout \cdot 10 + \left(1 - \cos x\right) \cdot {x}^{2}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x timeout)
  :name "(- (* (- 1 (cos x)) (pow x 2)) (* (- timeout) 10))"
  :precision binary64
  (- (* (- 1.0 (cos x)) (pow x 2.0)) (* (neg timeout) 10.0)))