Average Error: 29.7 → 0
Time: 11.6s
Precision: 64
Internal Precision: 2368
\[\frac{1 - \cos x}{\sin x}\]
\[\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

Target

Original29.7
Target0
Herbie0
\[\tan \left(\frac{x}{2}\right)\]

Derivation

  1. Initial program 29.7

    \[\frac{1 - \cos x}{\sin x}\]
  2. Initial simplification0

    \[\leadsto \tan \left(\frac{x}{2}\right)\]
  3. Final simplification0

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

Runtime

Time bar (total: 11.6s)Debug logProfile

herbie shell --seed 2018230 
(FPCore (x)
  :name "tanhf (example 3.4)"
  :herbie-expected 2

  :herbie-target
  (tan (/ x 2))

  (/ (- 1 (cos x)) (sin x)))