Average Error: 31.2 → 0.2
Time: 31.5s
Precision: 64
Internal Precision: 128
\[\frac{1 - \cos x}{x \cdot x}\]
\[\frac{\frac{\sin x}{x}}{x} \cdot \tan \left(\frac{x}{2}\right)\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 31.2

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

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

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

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

    \[\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 times-frac15.8

    \[\leadsto \color{blue}{\frac{\sin x}{x \cdot x} \cdot \frac{\sin x}{1 + \cos x}}\]
  9. Simplified15.6

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

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

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

Runtime

Time bar (total: 31.5s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.20.20.00.20%
herbie shell --seed 2018354 
(FPCore (x)
  :name "cos2 (problem 3.4.1)"
  (/ (- 1 (cos x)) (* x x)))