



Bits error versus x




Bits error versus eps
| Original | 36.9 |
|---|---|
| Target | 14.9 |
| Herbie | 0.3 |
if eps < -5.956917387507836e-06Initial program 28.4
rmApplied tan-sum0.4
rmApplied flip--0.5
if -5.956917387507836e-06 < eps < 3.1311107548585422e-06Initial program 44.8
rmApplied tan-sum44.2
rmApplied flip3--44.2
Applied associate-/r/44.2
Simplified44.2
rmApplied fma-udef44.2
Applied distribute-rgt-in44.2
Applied associate--l+39.7
Taylor expanded around 0 0.2
if 3.1311107548585422e-06 < eps Initial program 29.9
rmApplied tan-sum0.4
rmApplied flip3--0.4
Applied associate-/r/0.4
Simplified0.4
rmApplied tan-quot0.5
Applied associate-*l/0.5
Applied cube-div0.5
Final simplification0.3
herbie shell --seed 2019002 +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: 56.2s)Debug log
1 calls. Slowest were:
| 4.0ms | (- (tan (+ x eps)) (tan x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 35.3b
Found 2 expressions with local error:
| 3.3b | (tan (+ x eps)) |
| 1.1b | (- (tan (+ x eps)) (tan x)) |
2 calls. Slowest were:
| 12.0ms | (- (tan (+ x eps)) (tan x)) |
| 3.0ms | (tan (+ x eps)) |
2 calls. Slowest were:
| 100.0ms | (- (tan (+ x eps)) (tan x)) |
| 87.0ms | (tan (+ x eps)) |
35 calls. Slowest were:
| 286.0ms | (+ (* x (pow eps 2)) (+ eps (* (pow x 2) eps))) |
| 192.0ms | (- (* (+ (tan x) (tan eps)) (cos x)) (* (- 1 (* (tan x) (tan eps))) (sin x))) |
| 179.0ms | (* (- 1 (* (tan x) (tan eps))) (cos x)) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 14.0b
Found 4 expressions with local error:
| 2.6b | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 0.2b | (* (tan x) (tan eps)) |
| 0.1b | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
| 0.1b | (+ (tan x) (tan eps)) |
4 calls. Slowest were:
| 39.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 25.0ms | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
| 8.0ms | (* (tan x) (tan eps)) |
4 calls. Slowest were:
| 458.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 213.0ms | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
| 126.0ms | (+ (tan x) (tan eps)) |
| 115.0ms | (* (tan x) (tan eps)) |
199 calls. Slowest were:
| 827.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))))) (- (* (cbrt (tan x)) (* (cbrt (tan x)) (cbrt (tan x)))))) |
| 509.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))))) |
| 486.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))))) |
15 alts after pruning (15 fresh and 0 done)
Merged error: 13.9b
Found 4 expressions with local error:
| 2.6b | (- (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (fma (* (tan eps) (tan x)) (fma (tan x) (tan eps) 1) 1)) (tan x)) |
| 0.3b | (pow (* (tan x) (tan eps)) 3) |
| 0.2b | (* (tan x) (tan eps)) |
| 0.2b | (* (tan eps) (tan x)) |
4 calls. Slowest were:
| 11.0ms | (- (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (fma (* (tan eps) (tan x)) (fma (tan x) (tan eps) 1) 1)) (tan x)) |
| 4.0ms | (* (tan x) (tan eps)) |
| 4.0ms | (* (tan eps) (tan x)) |
4 calls. Slowest were:
| 1.2s | (- (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (fma (* (tan eps) (tan x)) (fma (tan x) (tan eps) 1) 1)) (tan x)) |
| 139.0ms | (pow (* (tan x) (tan eps)) 3) |
| 107.0ms | (* (tan eps) (tan x)) |
| 101.0ms | (* (tan x) (tan eps)) |
59 calls. Slowest were:
| 584.0ms | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (fma (* (tan eps) (tan x)) (fma (tan x) (tan eps) 1) 1) (- (* (sqrt (tan x)) (sqrt (tan x))))) |
| 422.0ms | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (fma (* (tan eps) (tan x)) (fma (tan x) (tan eps) 1) 1) (- (* (cbrt (tan x)) (* (cbrt (tan x)) (cbrt (tan x)))))) |
| 405.0ms | (fma (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (fma (* (tan eps) (tan x)) (fma (tan x) (tan eps) 1) 1) (- (* (tan x) 1))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 12.0b
Found 4 expressions with local error:
| 2.7b | (- (* 1 (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3)))) (tan x)) |
| 0.3b | (* (* (* (tan eps) (tan x)) (fma (tan x) (tan eps) 1)) (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3)))) |
| 0.3b | (pow (* (tan x) (tan eps)) 3) |
| 0.3b | (pow (* (tan x) (tan eps)) 3) |
4 calls. Slowest were:
| 40.0ms | (* (* (* (tan eps) (tan x)) (fma (tan x) (tan eps) 1)) (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3)))) |
| 14.0ms | (- (* 1 (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3)))) (tan x)) |
| 6.0ms | (pow (* (tan x) (tan eps)) 3) |
4 calls. Slowest were:
| 464.0ms | (- (* 1 (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3)))) (tan x)) |
| 436.0ms | (* (* (* (tan eps) (tan x)) (fma (tan x) (tan eps) 1)) (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3)))) |
| 120.0ms | (pow (* (tan x) (tan eps)) 3) |
| 107.0ms | (pow (* (tan x) (tan eps)) 3) |
104 calls. Slowest were:
| 664.0ms | (* (* (* (tan eps) (sin x)) (fma (tan x) (tan eps) 1)) (+ (tan x) (tan eps))) |
| 391.0ms | (+ (* (pow 1 3) (pow 1 3)) (+ (* (pow (* (tan x) (tan eps)) 3) (pow (* (tan x) (tan eps)) 3)) (* (pow 1 3) (pow (* (tan x) (tan eps)) 3)))) |
| 353.0ms | (* (* (* (sin eps) (sin x)) (fma (tan x) (tan eps) 1)) (+ (tan x) (tan eps))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 0.1b
99.1% (0.2b remaining)
Error of 0.3b against oracle of 0.2b and baseline of 19.7b