



Bits error versus x




Bits error versus eps
| Original | 36.7 |
|---|---|
| Target | 14.9 |
| Herbie | 14.4 |
if (/ (- (* (+ (tan x) (tan eps)) (+ (* (cos x) (pow (* (tan eps) (tan x)) 3)) (cos x))) (* (- 1 (* (* (tan eps) (tan x)) (* (tan eps) (tan x)))) (* (sin x) (+ (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (- 1 (* (tan eps) (tan x))))))) (* (* (- 1 (* (* (tan eps) (tan x)) (* (tan eps) (tan x)))) (+ (- 1 (* (tan eps) (tan x))) (* (* (tan eps) (tan x)) (* (tan eps) (tan x))))) (cos x))) < -3.562198966313061e-16Initial program 30.9
rmApplied tan-sum3.7
rmApplied flip--3.7
Applied associate-/r/3.7
Applied simplify3.7
rmApplied flip--3.8
if -3.562198966313061e-16 < (/ (- (* (+ (tan x) (tan eps)) (+ (* (cos x) (pow (* (tan eps) (tan x)) 3)) (cos x))) (* (- 1 (* (* (tan eps) (tan x)) (* (tan eps) (tan x)))) (* (sin x) (+ (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (- 1 (* (tan eps) (tan x))))))) (* (* (- 1 (* (* (tan eps) (tan x)) (* (tan eps) (tan x)))) (+ (- 1 (* (tan eps) (tan x))) (* (* (tan eps) (tan x)) (* (tan eps) (tan x))))) (cos x))) < 2.1322419203862984e-16Initial program 43.8
Taylor expanded around 0 27.3
if 2.1322419203862984e-16 < (/ (- (* (+ (tan x) (tan eps)) (+ (* (cos x) (pow (* (tan eps) (tan x)) 3)) (cos x))) (* (- 1 (* (* (tan eps) (tan x)) (* (tan eps) (tan x)))) (* (sin x) (+ (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (- 1 (* (tan eps) (tan x))))))) (* (* (- 1 (* (* (tan eps) (tan x)) (* (tan eps) (tan x)))) (+ (- 1 (* (tan eps) (tan x))) (* (* (tan eps) (tan x)) (* (tan eps) (tan x))))) (cos x))) Initial program 31.2
rmApplied tan-sum4.6
rmApplied add-cube-cbrt4.8
Time bar (total: 1.5m)Debug logProfile
herbie shell --seed '#(1064269945 2896236262 301053905 1701069080 1701464310 1614783279)'
(FPCore (x eps)
:name "2tan (problem 3.3.2)"
:herbie-expected 28
:herbie-target
(/ (sin eps) (* (cos x) (cos (+ x eps))))
(- (tan (+ x eps)) (tan x)))