



Bits error versus x




Bits error versus eps
| Original | 37.1 |
|---|---|
| Target | 14.8 |
| Herbie | 15.5 |
if eps < -1.6718721488586065e-18Initial program 29.4
rmApplied tan-sum0.9
rmApplied div-inv0.9
Applied fma-neg0.9
rmApplied add-cbrt-cube1.0
if -1.6718721488586065e-18 < eps < 1.0288762116509696e-29Initial program 45.7
Taylor expanded around 0 31.4
Simplified31.3
if 1.0288762116509696e-29 < eps Initial program 29.5
rmApplied tan-sum2.0
rmApplied flip--2.1
Applied associate-/r/2.1
Applied fma-neg2.1
Simplified2.1
Final simplification15.5
herbie shell --seed 2018360 +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: 43.1s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 33.6b
Found 2 expressions with local error:
| 3.4b | (tan (+ x eps)) |
| 1.2b | (- (tan (+ x eps)) (tan x)) |
2 calls. Slowest were:
| 11.0ms | (- (tan (+ x eps)) (tan x)) |
| 3.0ms | (tan (+ x eps)) |
2 calls. Slowest were:
| 100.0ms | (- (tan (+ x eps)) (tan x)) |
| 74.0ms | (tan (+ x eps)) |
35 calls. Slowest were:
| 499.0ms | (- (* (+ (tan x) (tan eps)) (cos x)) (* (- 1 (* (tan x) (tan eps))) (sin x))) |
| 118.0ms | (+ (* x (pow eps 2)) (+ eps (* (pow x 2) eps))) |
| 89.0ms | (* (- 1 (* (tan x) (tan eps))) (cos x)) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 11.5b
Found 4 expressions with local error:
| 1.8b | (- (/ (+ (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 | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
4 calls. Slowest were:
| 64.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:
| 415.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 234.0ms | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
| 110.0ms | (+ (tan x) (tan eps)) |
| 108.0ms | (* (tan x) (tan eps)) |
199 calls. Slowest were:
| 359.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)))))) |
| 320.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))))) |
| 312.0ms | (- (* (+ (tan x) (tan eps)) (cos x)) (* (- 1 (* (tan x) (tan eps))) (sin x))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 11.4b
Found 4 expressions with local error:
| 1.8b | (fma (+ (tan x) (tan eps)) (/ 1 (- 1 (* (tan x) (tan eps)))) (- (tan x))) |
| 0.2b | (* (tan x) (tan eps)) |
| 0.1b | (+ (tan x) (tan eps)) |
| 0.1b | (/ 1 (- 1 (* (tan x) (tan eps)))) |
4 calls. Slowest were:
| 4.0ms | (* (tan x) (tan eps)) |
| 4.0ms | (+ (tan x) (tan eps)) |
| 1.0ms | (/ 1 (- 1 (* (tan x) (tan eps)))) |
4 calls. Slowest were:
| 244.0ms | (fma (+ (tan x) (tan eps)) (/ 1 (- 1 (* (tan x) (tan eps)))) (- (tan x))) |
| 142.0ms | (/ 1 (- 1 (* (tan x) (tan eps)))) |
| 79.0ms | (* (tan x) (tan eps)) |
| 79.0ms | (+ (tan x) (tan eps)) |
36 calls. Slowest were:
| 244.0ms | (+ (* 1/3 (* (pow x 3) eps)) (+ (* 1/3 (* x (pow eps 3))) (* x eps))) |
| 197.0ms | (+ (* 1/3 (* (pow x 3) eps)) (+ (* x eps) 1)) |
| 154.0ms | (/ 1 (- 1 (/ (* (sin x) (sin eps)) (* (cos x) (cos eps))))) |
13 alts after pruning (13 fresh and 0 done)
Merged error: 11.4b
Found 4 expressions with local error:
| 28.0b | (cbrt (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps)))) |
| 1.8b | (fma (+ (tan x) (tan eps)) (/ 1 (- 1 (cbrt (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps)))))) (- (tan x))) |
| 0.3b | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 0.2b | (* (tan x) (tan eps)) |
4 calls. Slowest were:
| 73.0ms | (cbrt (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps)))) |
| 35.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 8.0ms | (* (tan x) (tan eps)) |
4 calls. Slowest were:
| 324.0ms | (fma (+ (tan x) (tan eps)) (/ 1 (- 1 (cbrt (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps)))))) (- (tan x))) |
| 115.0ms | (cbrt (* (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* (tan x) (tan eps)))) |
| 104.0ms | (* (tan x) (tan eps)) |
| 101.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
137 calls. Slowest were:
| 551.0ms | (cbrt (* (* (* (tan x) (tan eps)) (* (sin x) (sin eps))) (* (sin x) (tan eps)))) |
| 541.0ms | (cbrt (* (* (* (tan x) (tan eps)) (* (sin x) (tan eps))) (* (sin x) (sin eps)))) |
| 523.0ms | (cbrt (* (* (* (tan x) (tan eps)) (* (tan x) (sin eps))) (* (sin x) (tan eps)))) |
14 alts after pruning (14 fresh and 0 done)
Merged error: 11.4b
90.6% (0.7b remaining)
Error of 15.5b against oracle of 14.8b and baseline of 22.2b