Average Error: 29.4 → 0.0
Time: 18.0s
Precision: 64
Internal Precision: 2624
\[\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.4
Target0.0
Herbie0.0
\[\tan \left(\frac{x}{2}\right)\]

Derivation

  1. Initial program 29.4

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

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

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

Runtime

Time bar (total: 18.0s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.00.00.00.0100%
herbie shell --seed 2018295 
(FPCore (x)
  :name "tanhf (example 3.4)"
  :herbie-expected 2

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

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