Average Error: 30.6 → 0.3
Time: 30.7s
Precision: 64
Internal Precision: 2368
\[\frac{1 - \cos x}{x \cdot x}\]
\[\frac{\sin x}{x} \cdot \frac{\sin x}{(\left(\cos x\right) \cdot x + x)_*}\]

Error

Bits error versus x

Derivation

  1. Initial program 30.6

    \[\frac{1 - \cos x}{x \cdot x}\]
  2. Initial simplification30.6

    \[\leadsto \frac{1 - \cos x}{x \cdot x}\]
  3. Using strategy rm
  4. Applied flip--30.8

    \[\leadsto \frac{\color{blue}{\frac{1 \cdot 1 - \cos x \cdot \cos x}{1 + \cos x}}}{x \cdot x}\]
  5. Applied associate-/l/30.8

    \[\leadsto \color{blue}{\frac{1 \cdot 1 - \cos x \cdot \cos x}{\left(x \cdot x\right) \cdot \left(1 + \cos x\right)}}\]
  6. Simplified14.9

    \[\leadsto \frac{\color{blue}{\sin x \cdot \sin x}}{\left(x \cdot x\right) \cdot \left(1 + \cos x\right)}\]
  7. Using strategy rm
  8. Applied associate-*l*15.0

    \[\leadsto \frac{\sin x \cdot \sin x}{\color{blue}{x \cdot \left(x \cdot \left(1 + \cos x\right)\right)}}\]
  9. Using strategy rm
  10. Applied times-frac0.3

    \[\leadsto \color{blue}{\frac{\sin x}{x} \cdot \frac{\sin x}{x \cdot \left(1 + \cos x\right)}}\]
  11. Simplified0.3

    \[\leadsto \frac{\sin x}{x} \cdot \color{blue}{\frac{\sin x}{(\left(\cos x\right) \cdot x + x)_*}}\]
  12. Final simplification0.3

    \[\leadsto \frac{\sin x}{x} \cdot \frac{\sin x}{(\left(\cos x\right) \cdot x + x)_*}\]

Runtime

Time bar (total: 30.7s)Debug logProfile

herbie shell --seed 2018277 +o rules:numerics
(FPCore (x)
  :name "cos2 (problem 3.4.1)"
  (/ (- 1 (cos x)) (* x x)))