Average Error: 0.2 → 0.3
Time: 6.2s
Precision: 64
Internal Precision: 576
\[\sin x - \cos x\]
\[\sin x - \log \left(e^{\cos x}\right)\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\sin x - \cos x\]
  2. Using strategy rm
  3. Applied add-log-exp0.3

    \[\leadsto \sin x - \color{blue}{\log \left(e^{\cos x}\right)}\]
  4. Applied add-log-exp0.4

    \[\leadsto \color{blue}{\log \left(e^{\sin x}\right)} - \log \left(e^{\cos x}\right)\]
  5. Applied diff-log0.4

    \[\leadsto \color{blue}{\log \left(\frac{e^{\sin x}}{e^{\cos x}}\right)}\]
  6. Simplified0.3

    \[\leadsto \log \color{blue}{\left(e^{\sin x - \cos x}\right)}\]
  7. Using strategy rm
  8. Applied exp-diff0.4

    \[\leadsto \log \color{blue}{\left(\frac{e^{\sin x}}{e^{\cos x}}\right)}\]
  9. Applied log-div0.4

    \[\leadsto \color{blue}{\log \left(e^{\sin x}\right) - \log \left(e^{\cos x}\right)}\]
  10. Simplified0.3

    \[\leadsto \color{blue}{\sin x} - \log \left(e^{\cos x}\right)\]
  11. Final simplification0.3

    \[\leadsto \sin x - \log \left(e^{\cos x}\right)\]

Runtime

Time bar (total: 6.2s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (x)
  :name "sin(x) - cos(x)"
  (- (sin x) (cos x)))