Average Error: 30.6 → 0.4
Time: 36.7s
Precision: 64
Internal Precision: 2368
\[\frac{1 - \cos x}{x \cdot x}\]
\[\frac{\tan \left(\frac{x}{2}\right)}{\frac{x}{\frac{\sin x}{x}}}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Taylor expanded around inf 14.9

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

    \[\leadsto \color{blue}{\frac{\tan \left(\frac{x}{2}\right)}{\frac{x \cdot x}{\sin x}}}\]
  9. Using strategy rm
  10. Applied associate-/l*0.4

    \[\leadsto \frac{\tan \left(\frac{x}{2}\right)}{\color{blue}{\frac{x}{\frac{\sin x}{x}}}}\]
  11. Final simplification0.4

    \[\leadsto \frac{\tan \left(\frac{x}{2}\right)}{\frac{x}{\frac{\sin x}{x}}}\]

Runtime

Time bar (total: 36.7s)Debug logProfile

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