Average Error: 31.3 → 1.1
Time: 1.4m
Precision: 64
Internal Precision: 2432
\[\frac{1 - \cos x}{x \cdot x}\]
\[\frac{\frac{\sin x}{\sqrt{1 + \cos x}}}{x} \cdot \frac{\frac{\sin x}{\sqrt{1 + \cos x}}}{x}\]

Error

Bits error versus x

Derivation

  1. Initial program 31.3

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

    \[\leadsto \frac{\color{blue}{\frac{1 \cdot 1 - \cos x \cdot \cos x}{1 + \cos x}}}{x \cdot x}\]
  4. Applied simplify15.6

    \[\leadsto \frac{\frac{\color{blue}{\sin x \cdot \sin x}}{1 + \cos x}}{x \cdot x}\]
  5. Using strategy rm
  6. Applied add-sqr-sqrt16.0

    \[\leadsto \frac{\frac{\sin x \cdot \sin x}{\color{blue}{\sqrt{1 + \cos x} \cdot \sqrt{1 + \cos x}}}}{x \cdot x}\]
  7. Applied times-frac15.9

    \[\leadsto \frac{\color{blue}{\frac{\sin x}{\sqrt{1 + \cos x}} \cdot \frac{\sin x}{\sqrt{1 + \cos x}}}}{x \cdot x}\]
  8. Applied times-frac1.1

    \[\leadsto \color{blue}{\frac{\frac{\sin x}{\sqrt{1 + \cos x}}}{x} \cdot \frac{\frac{\sin x}{\sqrt{1 + \cos x}}}{x}}\]

Runtime

Time bar (total: 1.4m)Debug logProfile

herbie shell --seed '#(1070706311 3771791028 4128836681 4194990999 2341756049 504035650)' +o rules:numerics
(FPCore (x)
  :name "cos2 (problem 3.4.1)"
  (/ (- 1 (cos x)) (* x x)))