



Bits error versus x




Bits error versus eps
| Original | 37.5 |
|---|---|
| Target | 15.1 |
| Herbie | 15.9 |
if eps < -2.388080272206088e-71 or 4.5316032501739245e-45 < eps Initial program 30.7
rmApplied tan-sum4.7
rmApplied flip3--4.7
Applied associate-/r/4.7
Applied fma-neg4.7
rmApplied add-cbrt-cube4.8
Applied add-cbrt-cube4.8
Applied cbrt-unprod4.8
Applied rem-cube-cbrt4.7
Simplified4.7
if -2.388080272206088e-71 < eps < 4.5316032501739245e-45Initial program 47.0
rmApplied tan-sum47.0
Taylor expanded around 0 31.6
Simplified31.6
Final simplification15.9
herbie shell --seed 2019004 +o rules:numerics
(FPCore (x eps)
:name "2tan (problem 3.3.2)"
:herbie-target
(/ (sin eps) (* (cos x) (cos (+ x eps))))
(- (tan (+ x eps)) (tan x)))
Time bar (total: 48.2s)Debug log
1 calls. Slowest were:
| 8.0ms | (- (tan (+ x eps)) (tan x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 38.0b
Found 2 expressions with local error:
| 3.6b | (tan (+ x eps)) |
| 0.8b | (- (tan (+ x eps)) (tan x)) |
2 calls. Slowest were:
| 6.0ms | (- (tan (+ x eps)) (tan x)) |
| 2.0ms | (tan (+ x eps)) |
2 calls. Slowest were:
| 88.0ms | (- (tan (+ x eps)) (tan x)) |
| 72.0ms | (tan (+ x eps)) |
35 calls. Slowest were:
| 240.0ms | (- (* (+ (tan x) (tan eps)) (cos x)) (* (- 1 (* (tan x) (tan eps))) (sin x))) |
| 196.0ms | (+ (* x (pow eps 2)) (+ eps (* (pow x 2) eps))) |
| 155.0ms | (* (- 1 (* (tan x) (tan eps))) (cos x)) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 14.4b
Found 4 expressions with local error:
| 1.8b | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 0.3b | (* (tan x) (tan eps)) |
| 0.2b | (+ (tan x) (tan eps)) |
| 0.1b | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
4 calls. Slowest were:
| 35.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 12.0ms | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
| 4.0ms | (* (tan x) (tan eps)) |
4 calls. Slowest were:
| 409.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 268.0ms | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
| 129.0ms | (* (tan x) (tan eps)) |
| 121.0ms | (+ (tan x) (tan eps)) |
199 calls. Slowest were:
| 560.0ms | (fma (/ 1 (* (cbrt (- 1 (* (tan x) (tan eps)))) (cbrt (- 1 (* (tan x) (tan eps)))))) (/ (+ (tan x) (tan eps)) (cbrt (- 1 (* (tan x) (tan eps))))) (- (* (sqrt (tan x)) (sqrt (tan x))))) |
| 515.0ms | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (+ (* 1 1) (+ (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* 1 (* (tan x) (tan eps))))) (- (* (cbrt (tan x)) (* (cbrt (tan x)) (cbrt (tan x)))))) |
| 503.0ms | (fma (/ 1 (* (cbrt (- 1 (* (tan x) (tan eps)))) (cbrt (- 1 (* (tan x) (tan eps)))))) (/ (+ (tan x) (tan eps)) (cbrt (- 1 (* (tan x) (tan eps))))) (- (* (sqrt (tan x)) (sqrt (tan x))))) |
18 alts after pruning (18 fresh and 0 done)
Merged error: 14.2b
Found 4 expressions with local error:
| 1.9b | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (+ (* 1 1) (+ (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* 1 (* (tan x) (tan eps))))) (- (tan x))) |
| 0.3b | (pow (* (tan x) (tan eps)) 3) |
| 0.3b | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 0.3b | (* (tan x) (tan eps)) |
4 calls. Slowest were:
| 17.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 4.0ms | (* (tan x) (tan eps)) |
| 4.0ms | (pow (* (tan x) (tan eps)) 3) |
4 calls. Slowest were:
| 947.0ms | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (+ (* 1 1) (+ (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* 1 (* (tan x) (tan eps))))) (- (tan x))) |
| 153.0ms | (pow (* (tan x) (tan eps)) 3) |
| 142.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 101.0ms | (* (tan x) (tan eps)) |
83 calls. Slowest were:
| 683.0ms | (* (* (* (* (tan x) (tan x)) (tan x)) (* (* (tan eps) (tan eps)) (tan eps))) (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps)))) |
| 620.0ms | (* (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps))) (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps)))) |
| 567.0ms | (* (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps))) (* (* (* (tan x) (tan x)) (tan x)) (* (* (tan eps) (tan eps)) (tan eps)))) |
17 alts after pruning (17 fresh and 0 done)
Merged error: 14.2b
Found 4 expressions with local error:
| 1.9b | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (* (pow (tan x) 3) (* (* (tan eps) (tan eps)) (tan eps))))) (+ (* 1 1) (+ (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* 1 (* (tan x) (tan eps))))) (- (tan x))) |
| 0.4b | (pow (tan x) 3) |
| 0.3b | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 0.3b | (* (* (tan eps) (tan eps)) (tan eps)) |
4 calls. Slowest were:
| 22.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 11.0ms | (* (* (tan eps) (tan eps)) (tan eps)) |
| 1.0ms | (pow (tan x) 3) |
4 calls. Slowest were:
| 972.0ms | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (* (pow (tan x) 3) (* (* (tan eps) (tan eps)) (tan eps))))) (+ (* 1 1) (+ (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* 1 (* (tan x) (tan eps))))) (- (tan x))) |
| 120.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 55.0ms | (* (* (tan eps) (tan eps)) (tan eps)) |
| 55.0ms | (pow (tan x) 3) |
100 calls. Slowest were:
| 693.0ms | (* (* (* (* (tan x) (tan x)) (tan x)) (* (* (tan eps) (tan eps)) (tan eps))) (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps)))) |
| 645.0ms | (* (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps))) (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps)))) |
| 481.0ms | (* (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps))) (* (* (* (tan x) (tan x)) (tan x)) (* (* (tan eps) (tan eps)) (tan eps)))) |
17 alts after pruning (16 fresh and 1 done)
Merged error: 14.2b
88.3% (0.9b remaining)
Error of 15.9b against oracle of 15.1b and baseline of 22.4b