Average Error: 5.9 → 0.2
Time: 6.1s
Precision: 64
Internal Precision: 576
\[\frac{1 - cosx}{{x}^{2}}\]
\[\frac{\frac{1}{x}}{x} - \frac{\frac{cosx}{x}}{x}\]

Error

Bits error versus cosx

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 5.9

    \[\frac{1 - cosx}{{x}^{2}}\]
  2. Initial simplification5.9

    \[\leadsto \frac{1 - cosx}{x \cdot x}\]
  3. Using strategy rm
  4. Applied associate-/r*0.2

    \[\leadsto \color{blue}{\frac{\frac{1 - cosx}{x}}{x}}\]
  5. Using strategy rm
  6. Applied div-sub0.2

    \[\leadsto \frac{\color{blue}{\frac{1}{x} - \frac{cosx}{x}}}{x}\]
  7. Applied div-sub0.2

    \[\leadsto \color{blue}{\frac{\frac{1}{x}}{x} - \frac{\frac{cosx}{x}}{x}}\]
  8. Final simplification0.2

    \[\leadsto \frac{\frac{1}{x}}{x} - \frac{\frac{cosx}{x}}{x}\]

Runtime

Time bar (total: 6.1s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (cosx x)
  :name "((1-cosx)/(x^2))"
  (/ (- 1 cosx) (pow x 2)))