



Bits error versus x




Bits error versus eps
| Original | 37.5 |
|---|---|
| Target | 15.3 |
| Herbie | 13.8 |
if eps < -4.381173797888801e-25Initial program 30.9
Initial simplification30.9
rmApplied tan-sum1.9
rmApplied tan-quot2.0
Applied associate-*r/2.0
rmApplied add-sqr-sqrt31.8
Applied flip3--31.8
Applied associate-/r/31.8
Applied prod-diff31.8
Simplified31.8
Simplified2.0
rmApplied flip--2.0
Applied associate-/r/2.0
Applied fma-neg2.0
if -4.381173797888801e-25 < eps < 5.883598483952283e-44Initial program 45.8
Initial simplification45.8
rmApplied tan-sum45.8
rmApplied tan-quot45.8
Applied associate-*r/45.8
Taylor expanded around 0 27.3
Simplified27.3
if 5.883598483952283e-44 < eps Initial program 30.7
Initial simplification30.7
rmApplied tan-sum3.8
rmApplied tan-quot3.8
Applied frac-sub3.8
Simplified3.8
Final simplification13.8
herbie shell --seed 2018362 +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: 49.1s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 37.0b
Found 2 expressions with local error:
| 3.1b | (tan (+ eps x)) |
| 2.0b | (- (tan (+ eps x)) (tan x)) |
2 calls. Slowest were:
| 28.0ms | (- (tan (+ eps x)) (tan x)) |
| 1.0ms | (tan (+ eps x)) |
2 calls. Slowest were:
| 127.0ms | (- (tan (+ eps x)) (tan x)) |
| 57.0ms | (tan (+ eps x)) |
35 calls. Slowest were:
| 230.0ms | (- (* (+ (tan eps) (tan x)) (cos x)) (* (- 1 (* (tan eps) (tan x))) (sin x))) |
| 179.0ms | (* (- 1 (* (tan eps) (tan x))) (cos x)) |
| 146.0ms | (+ (* x (pow eps 2)) (+ (* 1/3 (pow eps 3)) eps)) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 14.2b
Found 4 expressions with local error:
| 2.7b | (- (/ (+ (tan eps) (tan x)) (- 1 (* (tan eps) (tan x)))) (tan x)) |
| 0.2b | (* (tan eps) (tan x)) |
| 0.1b | (/ (+ (tan eps) (tan x)) (- 1 (* (tan eps) (tan x)))) |
| 0.1b | (+ (tan eps) (tan x)) |
4 calls. Slowest were:
| 41.0ms | (- (/ (+ (tan eps) (tan x)) (- 1 (* (tan eps) (tan x)))) (tan x)) |
| 14.0ms | (/ (+ (tan eps) (tan x)) (- 1 (* (tan eps) (tan x)))) |
| 4.0ms | (* (tan eps) (tan x)) |
4 calls. Slowest were:
| 405.0ms | (- (/ (+ (tan eps) (tan x)) (- 1 (* (tan eps) (tan x)))) (tan x)) |
| 233.0ms | (/ (+ (tan eps) (tan x)) (- 1 (* (tan eps) (tan x)))) |
| 103.0ms | (+ (tan eps) (tan x)) |
| 90.0ms | (* (tan eps) (tan x)) |
199 calls. Slowest were:
| 646.0ms | (fma (/ 1 (* (cbrt (- 1 (* (tan eps) (tan x)))) (cbrt (- 1 (* (tan eps) (tan x)))))) (/ (+ (tan eps) (tan x)) (cbrt (- 1 (* (tan eps) (tan x))))) (- (* (tan x) 1))) |
| 453.0ms | (fma (/ 1 (* (cbrt (- 1 (* (tan eps) (tan x)))) (cbrt (- 1 (* (tan eps) (tan x)))))) (/ (+ (tan eps) (tan x)) (cbrt (- 1 (* (tan eps) (tan x))))) (- (* (tan x) 1))) |
| 443.0ms | (fma (/ (+ (tan eps) (tan x)) (- (pow 1 3) (pow (* (tan eps) (tan x)) 3))) (+ (* 1 1) (+ (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* 1 (* (tan eps) (tan x))))) (- (* (tan x) 1))) |
14 alts after pruning (14 fresh and 0 done)
Merged error: 14.1b
Found 4 expressions with local error:
| 2.7b | (- (/ (+ (tan eps) (tan x)) (- 1 (/ (* (tan eps) (sin x)) (cos x)))) (tan x)) |
| 0.2b | (* (tan eps) (sin x)) |
| 0.2b | (/ (* (tan eps) (sin x)) (cos x)) |
| 0.1b | (/ (+ (tan eps) (tan x)) (- 1 (/ (* (tan eps) (sin x)) (cos x)))) |
4 calls. Slowest were:
| 48.0ms | (- (/ (+ (tan eps) (tan x)) (- 1 (/ (* (tan eps) (sin x)) (cos x)))) (tan x)) |
| 13.0ms | (/ (+ (tan eps) (tan x)) (- 1 (/ (* (tan eps) (sin x)) (cos x)))) |
| 7.0ms | (/ (* (tan eps) (sin x)) (cos x)) |
4 calls. Slowest were:
| 481.0ms | (- (/ (+ (tan eps) (tan x)) (- 1 (/ (* (tan eps) (sin x)) (cos x)))) (tan x)) |
| 225.0ms | (/ (+ (tan eps) (tan x)) (- 1 (/ (* (tan eps) (sin x)) (cos x)))) |
| 109.0ms | (/ (* (tan eps) (sin x)) (cos x)) |
| 88.0ms | (* (tan eps) (sin x)) |
205 calls. Slowest were:
| 554.0ms | (fma (/ 1 (* (cbrt (- 1 (/ (* (tan eps) (sin x)) (cos x)))) (cbrt (- 1 (/ (* (tan eps) (sin x)) (cos x)))))) (/ (+ (tan eps) (tan x)) (cbrt (- 1 (/ (* (tan eps) (sin x)) (cos x))))) (- (* (sqrt (tan x)) (sqrt (tan x))))) |
| 451.0ms | (fma (/ 1 (sqrt (- 1 (/ (* (tan eps) (sin x)) (cos x))))) (/ (+ (tan eps) (tan x)) (sqrt (- 1 (/ (* (tan eps) (sin x)) (cos x))))) (- (* (cbrt (tan x)) (* (cbrt (tan x)) (cbrt (tan x)))))) |
| 418.0ms | (fma (/ 1 (* (cbrt (- 1 (/ (* (tan eps) (sin x)) (cos x)))) (cbrt (- 1 (/ (* (tan eps) (sin x)) (cos x)))))) (/ (+ (tan eps) (tan x)) (cbrt (- 1 (/ (* (tan eps) (sin x)) (cos x))))) (- (* (tan x) 1))) |
13 alts after pruning (13 fresh and 0 done)
Merged error: 14.1b
Found 4 expressions with local error:
| 2.7b | (- (/ (* (+ (tan x) (tan eps)) (fma (* (/ (tan eps) (cos x)) (sin x)) (fma (/ (tan eps) (cos x)) (sin x) 1) 1)) (- 1 (pow (* (/ (tan eps) (cos x)) (sin x)) 3))) (tan x)) |
| 0.3b | (pow (* (/ (tan eps) (cos x)) (sin x)) 3) |
| 0.2b | (* (/ (tan eps) (cos x)) (sin x)) |
| 0.2b | (* (/ (tan eps) (cos x)) (sin x)) |
4 calls. Slowest were:
| 15.0ms | (- (/ (* (+ (tan x) (tan eps)) (fma (* (/ (tan eps) (cos x)) (sin x)) (fma (/ (tan eps) (cos x)) (sin x) 1) 1)) (- 1 (pow (* (/ (tan eps) (cos x)) (sin x)) 3))) (tan x)) |
| 6.0ms | (* (/ (tan eps) (cos x)) (sin x)) |
| 6.0ms | (* (/ (tan eps) (cos x)) (sin x)) |
4 calls. Slowest were:
| 1.2s | (- (/ (* (+ (tan x) (tan eps)) (fma (* (/ (tan eps) (cos x)) (sin x)) (fma (/ (tan eps) (cos x)) (sin x) 1) 1)) (- 1 (pow (* (/ (tan eps) (cos x)) (sin x)) 3))) (tan x)) |
| 102.0ms | (pow (* (/ (tan eps) (cos x)) (sin x)) 3) |
| 84.0ms | (* (/ (tan eps) (cos x)) (sin x)) |
| 83.0ms | (* (/ (tan eps) (cos x)) (sin x)) |
133 calls. Slowest were:
| 347.0ms | (* (/ (* (* (tan eps) (tan eps)) (tan eps)) (* (* (cos x) (cos x)) (cos x))) (* (* (sin x) (sin x)) (sin x))) |
| 344.0ms | (* (/ (* (* (tan eps) (tan eps)) (tan eps)) (* (* (cos x) (cos x)) (cos x))) (* (* (sin x) (sin x)) (sin x))) |
| 338.0ms | (- (/ (* (+ (tan x) (tan eps)) (fma (* (/ (tan eps) (cos x)) (sin x)) (fma (/ (tan eps) (cos x)) (sin x) 1) 1)) (- 1 (pow (* (/ (tan eps) (cos x)) (sin x)) 3))) (tan x)) |
14 alts after pruning (13 fresh and 1 done)
Merged error: 14.0b
94.3% (0.5b remaining)
Error of 13.8b against oracle of 13.3b and baseline of 22.0b