



Bits error versus x




Bits error versus eps
| Original | 37.2 |
|---|---|
| Target | 15.6 |
| Herbie | 15.3 |
if eps < -5.137551519123668e-87 or 7.274589610278849e-41 < eps Initial program 30.6
rmApplied tan-sum4.7
rmApplied tan-quot4.8
Applied frac-sub4.8
Simplified4.7
if -5.137551519123668e-87 < eps < 7.274589610278849e-41Initial program 47.2
rmApplied tan-sum47.2
Taylor expanded around 0 31.2
Simplified31.2
Final simplification15.3
herbie shell --seed 2019008 +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: 44.5s)Debug log
1 calls. Slowest were:
| 5.0ms | (- (tan (+ x eps)) (tan x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 38.3b
Found 2 expressions with local error:
| 4.4b | (tan (+ x eps)) |
| 2.3b | (- (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:
| 95.0ms | (- (tan (+ x eps)) (tan x)) |
| 71.0ms | (tan (+ x eps)) |
35 calls. Slowest were:
| 256.0ms | (- (* (+ (tan x) (tan eps)) (cos x)) (* (- 1 (* (tan x) (tan eps))) (sin x))) |
| 238.0ms | (+ (* x (pow eps 2)) (+ eps (* (pow x 2) eps))) |
| 192.0ms | (* (- 1 (* (tan x) (tan eps))) (cos x)) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 16.9b
Found 4 expressions with local error:
| 3.0b | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 0.2b | (* (tan x) (tan eps)) |
| 0.1b | (+ (tan x) (tan eps)) |
| 0.1b | (- 1 (* (tan x) (tan eps))) |
4 calls. Slowest were:
| 48.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 7.0ms | (+ (tan x) (tan eps)) |
| 5.0ms | (* (tan x) (tan eps)) |
4 calls. Slowest were:
| 384.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 154.0ms | (- 1 (* (tan x) (tan eps))) |
| 94.0ms | (+ (tan x) (tan eps)) |
| 93.0ms | (* (tan x) (tan eps)) |
163 calls. Slowest were:
| 631.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))))) |
| 565.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))))) |
| 498.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))))) (- (* (tan x) 1))) |
16 alts after pruning (16 fresh and 0 done)
Merged error: 16.8b
Found 4 expressions with local error:
| 3.0b | (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.2b | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 0.2b | (* (tan x) (tan eps)) |
4 calls. Slowest were:
| 17.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 4.0ms | (* (tan x) (tan eps)) |
| 3.0ms | (pow (* (tan x) (tan eps)) 3) |
4 calls. Slowest were:
| 962.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))) |
| 145.0ms | (pow (* (tan x) (tan eps)) 3) |
| 130.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 112.0ms | (* (tan x) (tan eps)) |
83 calls. Slowest were:
| 721.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)))) |
| 648.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)))) |
| 582.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)))) |
15 alts after pruning (15 fresh and 0 done)
Merged error: 16.8b
Found 4 expressions with local error:
| 3.0b | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (/ (pow (* (sin x) (tan eps)) 3) (pow (cos x) 3)))) (+ (* 1 1) (+ (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* 1 (* (tan x) (tan eps))))) (- (tan x))) |
| 0.3b | (pow (cos x) 3) |
| 0.3b | (pow (* (sin x) (tan eps)) 3) |
| 0.2b | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
4 calls. Slowest were:
| 26.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 3.0ms | (pow (* (sin x) (tan eps)) 3) |
| 1.0ms | (pow (cos x) 3) |
4 calls. Slowest were:
| 866.0ms | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (/ (pow (* (sin x) (tan eps)) 3) (pow (cos x) 3)))) (+ (* 1 1) (+ (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* 1 (* (tan x) (tan eps))))) (- (tan x))) |
| 107.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 101.0ms | (pow (* (sin x) (tan eps)) 3) |
| 21.0ms | (pow (cos x) 3) |
78 calls. Slowest were:
| 502.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)))) |
| 438.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)))) |
| 411.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)))) |
15 alts after pruning (15 fresh and 0 done)
Merged error: 16.8b
87.5% (0.9b remaining)
Error of 15.3b against oracle of 14.4b and baseline of 21.7b