Average Error: 23.5 → 23.5
Time: 2.5s
Precision: binary64
\[\frac{1 - \cos x}{{x}^{2}} - \left(-timeout\right) \cdot 100\]
\[timeout \cdot 100 + \frac{1 - \cos x}{{x}^{2}}\]

Error

Bits error versus x

Bits error versus timeout

Derivation

  1. Initial program 23.5

    \[\frac{1 - \cos x}{{x}^{2}} - \left(-timeout\right) \cdot 100\]
  2. Simplified23.5

    \[\leadsto \color{blue}{timeout \cdot 100 + \frac{1 - \cos x}{{x}^{2}}}\]
  3. Final simplification23.5

    \[\leadsto timeout \cdot 100 + \frac{1 - \cos x}{{x}^{2}}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x timeout)
  :name "(- (/ (- 1 (cos x)) (pow x 2)) (* (- timeout) 100))"
  :precision binary64
  (- (/ (- 1.0 (cos x)) (pow x 2.0)) (* (neg timeout) 100.0)))