Average Error: 31.1 → 0.3
Time: 23.6s
Precision: 64
Internal Precision: 128
\[\frac{1 - \cos x}{x \cdot x}\]
\[\left(\frac{1}{{\left(\cos x\right)}^{3} + 1} \cdot \left(\frac{\sin x}{x} \cdot \frac{\sin x}{x}\right)\right) \cdot \left((\left(\cos x\right) \cdot \left(\cos x\right) + 1)_* - \cos x\right)\]

Error

Bits error versus x

Derivation

  1. Initial program 31.1

    \[\frac{1 - \cos x}{x \cdot x}\]
  2. Using strategy rm
  3. Applied flip--31.2

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

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

    \[\leadsto \frac{\color{blue}{\sin x \cdot \sin x}}{\left(x \cdot x\right) \cdot \left(1 + \cos x\right)}\]
  6. Taylor expanded around -inf 15.6

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

    \[\leadsto \color{blue}{\frac{\frac{\sin x}{x} \cdot \frac{\sin x}{x}}{\cos x + 1}}\]
  8. Using strategy rm
  9. Applied div-inv0.3

    \[\leadsto \color{blue}{\left(\frac{\sin x}{x} \cdot \frac{\sin x}{x}\right) \cdot \frac{1}{\cos x + 1}}\]
  10. Using strategy rm
  11. Applied flip3-+0.3

    \[\leadsto \left(\frac{\sin x}{x} \cdot \frac{\sin x}{x}\right) \cdot \frac{1}{\color{blue}{\frac{{\left(\cos x\right)}^{3} + {1}^{3}}{\cos x \cdot \cos x + \left(1 \cdot 1 - \cos x \cdot 1\right)}}}\]
  12. Applied associate-/r/0.3

    \[\leadsto \left(\frac{\sin x}{x} \cdot \frac{\sin x}{x}\right) \cdot \color{blue}{\left(\frac{1}{{\left(\cos x\right)}^{3} + {1}^{3}} \cdot \left(\cos x \cdot \cos x + \left(1 \cdot 1 - \cos x \cdot 1\right)\right)\right)}\]
  13. Applied associate-*r*0.3

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

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

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

Reproduce

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