



Bits error versus x




Bits error versus eps
| Original | 37.0 |
|---|---|
| Target | 14.7 |
| Herbie | 14.0 |
if eps < -1.7531779447900738e-40Initial program 29.6
rmApplied tan-sum3.6
rmApplied tan-quot3.6
Applied frac-sub3.6
Simplified3.6
if -1.7531779447900738e-40 < eps < 2.649457653506729e-60Initial program 46.7
rmApplied tan-sum46.7
rmApplied tan-quot46.7
Applied associate-*l/46.7
rmApplied add-cube-cbrt47.6
Applied *-un-lft-identity47.6
Applied prod-diff47.7
Simplified47.6
Simplified46.7
Taylor expanded around 0 27.1
Simplified27.1
if 2.649457653506729e-60 < eps Initial program 30.2
rmApplied tan-sum4.9
rmApplied tan-quot4.9
Applied associate-*l/4.9
rmApplied add-cube-cbrt5.2
Applied *-un-lft-identity5.2
Applied prod-diff5.2
Simplified4.9
Simplified4.9
rmApplied tan-quot5.0
Applied frac-sub5.0
Simplified5.0
Final simplification14.0
herbie shell --seed 2019010 +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: 57.3s)Debug log
| 4.0ms | (- (tan (+ x eps)) (tan x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 35.1b
Found 2 expressions with local error:
| 2.9b | (tan (+ x eps)) |
| 1.8b | (- (tan (+ x eps)) (tan x)) |
| 11× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 9× | add-cube-cbrt |
| 9× | prod-diff |
| 4× | add-log-exp |
| 4× | tan-quot |
| 3× | fma-neg |
| 2× | log1p-expm1-u |
| 2× | frac-sub |
| 2× | add-exp-log |
| 2× | add-cbrt-cube |
| 2× | tan-sum |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 1× | difference-of-squares |
| 1× | distribute-lft-out-- |
| 1× | flip-- |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 12.0ms | (- (tan (+ x eps)) (tan x)) |
| 3.0ms | (tan (+ x eps)) |
| 132.0ms | (- (tan (+ x eps)) (tan x)) |
| 74.0ms | (tan (+ x eps)) |
| 229.0ms | (- (* (+ (tan x) (tan eps)) (cos x)) (* (- 1 (* (tan x) (tan eps))) (sin x))) |
| 212.0ms | (+ (* x (pow eps 2)) (+ eps (* (pow x 2) eps))) |
| 143.0ms | (* (- 1 (* (tan x) (tan eps))) (cos x)) |
| 49.0ms | (+ x (+ (* 1/3 (pow x 3)) eps)) |
| 41.0ms | (fma (sqrt (tan (+ x eps))) (sqrt (tan (+ x eps))) (- (* (sqrt (tan x)) (sqrt (tan x))))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 16.6b
Found 4 expressions with local error:
| 4.1b | (- (/ (+ (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))) |
| 85× | *-un-lft-identity |
| 62× | add-sqr-sqrt |
| 57× | add-cube-cbrt |
| 54× | prod-diff |
| 49× | times-frac |
| 18× | fma-neg |
| 13× | distribute-lft-out |
| 8× | add-log-exp |
| 8× | associate-/r/ |
| 7× | tan-quot |
| 6× | flip-- |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 6× | flip3-- |
| 6× | pow1 |
| 4× | div-inv |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | associate-*l* |
| 3× | associate-*r* |
| 3× | fma-def |
| 2× | difference-of-squares |
| 2× | sub-neg |
| 1× | distribute-lft-out-- |
| 1× | flip-+ |
| 1× | cbrt-unprod |
| 1× | frac-sub |
| 1× | *-commutative |
| 1× | associate-*r/ |
| 1× | prod-exp |
| 1× | frac-add |
| 1× | associate-*l/ |
| 1× | pow-prod-down |
| 1× | diff-log |
| 1× | flip3-+ |
| 1× | sum-log |
| 1× | +-commutative |
| 1× | frac-times |
| 59.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 7.0ms | (+ (tan x) (tan eps)) |
| 5.0ms | (* (tan x) (tan eps)) |
| 2.0ms | (- 1 (* (tan x) (tan eps))) |
| 390.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 130.0ms | (- 1 (* (tan x) (tan eps))) |
| 114.0ms | (+ (tan x) (tan eps)) |
| 107.0ms | (* (tan x) (tan eps)) |
| 538.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))))) |
| 526.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))))) |
| 479.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)))))) |
| 469.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)))))) |
| 466.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))) |
15 alts after pruning (15 fresh and 0 done)
Merged error: 16.4b
Found 4 expressions with local error:
| 4.1b | (- (/ (+ (tan x) (tan eps)) (- 1 (/ (* (sin x) (tan eps)) (cos x)))) (tan x)) |
| 0.2b | (* (sin x) (tan eps)) |
| 0.1b | (/ (* (sin x) (tan eps)) (cos x)) |
| 0.1b | (+ (tan x) (tan eps)) |
| 87× | *-un-lft-identity |
| 64× | add-sqr-sqrt |
| 59× | add-cube-cbrt |
| 54× | prod-diff |
| 52× | times-frac |
| 18× | fma-neg |
| 13× | distribute-lft-out |
| 11× | add-exp-log |
| 11× | add-cbrt-cube |
| 8× | add-log-exp |
| 8× | associate-/r/ |
| 6× | pow1 |
| 5× | flip-- |
| 5× | div-inv |
| 5× | tan-quot |
| 5× | flip3-- |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | associate-*l* |
| 3× | associate-*r* |
| 3× | fma-def |
| 3× | associate-/r* |
| 2× | difference-of-squares |
| 2× | cbrt-unprod |
| 2× | associate-*r/ |
| 2× | prod-exp |
| 2× | div-exp |
| 2× | cbrt-undiv |
| 1× | associate-/l/ |
| 1× | distribute-lft-out-- |
| 1× | associate-/l* |
| 1× | flip-+ |
| 1× | frac-sub |
| 1× | *-commutative |
| 1× | frac-add |
| 1× | pow-prod-down |
| 1× | diff-log |
| 1× | flip3-+ |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | clear-num |
| 1× | +-commutative |
| 70.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (/ (* (sin x) (tan eps)) (cos x)))) (tan x)) |
| 14.0ms | (/ (* (sin x) (tan eps)) (cos x)) |
| 8.0ms | (+ (tan x) (tan eps)) |
| 8.0ms | (* (sin x) (tan eps)) |
| 421.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (/ (* (sin x) (tan eps)) (cos x)))) (tan x)) |
| 145.0ms | (/ (* (sin x) (tan eps)) (cos x)) |
| 95.0ms | (+ (tan x) (tan eps)) |
| 87.0ms | (* (sin x) (tan eps)) |
| 515.0ms | (fma (/ 1 (sqrt (- 1 (/ (* (sin x) (tan eps)) (cos x))))) (/ (+ (tan x) (tan eps)) (sqrt (- 1 (/ (* (sin x) (tan eps)) (cos x))))) (- (* (tan x) 1))) |
| 500.0ms | (fma (/ 1 (* (cbrt (- 1 (/ (* (sin x) (tan eps)) (cos x)))) (cbrt (- 1 (/ (* (sin x) (tan eps)) (cos x)))))) (/ (+ (tan x) (tan eps)) (cbrt (- 1 (/ (* (sin x) (tan eps)) (cos x))))) (- (* (sqrt (tan x)) (sqrt (tan x))))) |
| 455.0ms | (fma (/ 1 (sqrt (- 1 (/ (* (sin x) (tan eps)) (cos x))))) (/ (+ (tan x) (tan eps)) (sqrt (- 1 (/ (* (sin x) (tan eps)) (cos x))))) (- (* (cbrt (tan x)) (* (cbrt (tan x)) (cbrt (tan x)))))) |
| 448.0ms | (fma (/ 1 (* (cbrt (- 1 (/ (* (sin x) (tan eps)) (cos x)))) (cbrt (- 1 (/ (* (sin x) (tan eps)) (cos x)))))) (/ (+ (tan x) (tan eps)) (cbrt (- 1 (/ (* (sin x) (tan eps)) (cos x))))) (- (* (tan x) 1))) |
| 427.0ms | (fma (/ 1 (* (cbrt (- 1 (/ (* (sin x) (tan eps)) (cos x)))) (cbrt (- 1 (/ (* (sin x) (tan eps)) (cos x)))))) (/ (+ (tan x) (tan eps)) (cbrt (- 1 (/ (* (sin x) (tan eps)) (cos x))))) (- (* (tan x) 1))) |
15 alts after pruning (15 fresh and 0 done)
Merged error: 16.4b
Found 4 expressions with local error:
| 4.1b | (- (/ (+ (tan eps) (tan x)) (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) (tan x)) |
| 0.1b | (/ (tan eps) (cos x)) |
| 0.1b | (+ (tan eps) (tan x)) |
| 0.1b | (/ (+ (tan eps) (tan x)) (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) |
| 106× | *-un-lft-identity |
| 75× | add-sqr-sqrt |
| 70× | add-cube-cbrt |
| 70× | times-frac |
| 48× | prod-diff |
| 17× | distribute-lft-out |
| 16× | fma-neg |
| 8× | add-log-exp |
| 8× | add-exp-log |
| 8× | add-cbrt-cube |
| 7× | associate-/l* |
| 6× | div-inv |
| 6× | tan-quot |
| 6× | associate-/r* |
| 4× | associate-/l/ |
| 4× | log1p-expm1-u |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | fma-def |
| 2× | difference-of-squares |
| 2× | flip-+ |
| 2× | frac-add |
| 2× | div-exp |
| 2× | flip3-+ |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | cbrt-undiv |
| 1× | distribute-lft-out-- |
| 1× | flip-- |
| 1× | frac-sub |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | +-commutative |
| 28.0ms | (- (/ (+ (tan eps) (tan x)) (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) (tan x)) |
| 11.0ms | (/ (+ (tan eps) (tan x)) (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) |
| 6.0ms | (/ (tan eps) (cos x)) |
| 3.0ms | (+ (tan eps) (tan x)) |
| 326.0ms | (- (/ (+ (tan eps) (tan x)) (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) (tan x)) |
| 179.0ms | (/ (+ (tan eps) (tan x)) (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) |
| 84.0ms | (+ (tan eps) (tan x)) |
| 55.0ms | (/ (tan eps) (cos x)) |
| 323.0ms | (fma (/ 1 (* (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1)))) (/ (+ (tan eps) (tan x)) (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1))) (- (* (sqrt (tan x)) (sqrt (tan x))))) |
| 319.0ms | (fma (/ 1 (* (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1)))) (/ (+ (tan eps) (tan x)) (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1))) (- (* (sqrt (tan x)) (sqrt (tan x))))) |
| 304.0ms | (fma (/ 1 (* (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1)))) (/ (+ (tan eps) (tan x)) (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1))) (- (* (tan x) 1))) |
| 303.0ms | (fma (/ 1 (* (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1)) (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1)))) (/ (+ (tan eps) (tan x)) (cbrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1))) (- (* (tan x) 1))) |
| 302.0ms | (fma (/ 1 (sqrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1))) (/ (+ (tan eps) (tan x)) (sqrt (fma (/ (tan eps) (cos x)) (- (sin x)) 1))) (- (* (cbrt (tan x)) (* (cbrt (tan x)) (cbrt (tan x)))))) |
14 alts after pruning (14 fresh and 0 done)
Merged error: 15.0b
93.7% (0.6b remaining)
Error of 14.0b against oracle of 13.4b and baseline of 22.3b