



Bits error versus x




Bits error versus eps
| Original | 37.0 |
|---|---|
| Target | 15.0 |
| Herbie | 0.6 |
Initial program 37.0
rmApplied tan-sum21.9
rmApplied div-inv21.9
Applied fma-neg21.9
rmApplied flip--21.9
Applied associate-/r/21.9
Simplified21.9
Taylor expanded around -inf 22.1
Simplified0.6
Final simplification0.6
herbie shell --seed 2019016 +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: 41.9s)Debug log
| 256× | (pre true 80) |
| 115× | (body real 1280) |
| 60× | (body real 640) |
| 27× | (body real 2560) |
| 25× | (body real 80) |
| 17× | (body real 320) |
| 12× | (body real 160) |
| 8.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:
| 3.9b | (tan (+ x eps)) |
| 1.6b | (- (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 |
| 11.0ms | (- (tan (+ x eps)) (tan x)) |
| 3.0ms | (tan (+ x eps)) |
| 128.0ms | (- (tan (+ x eps)) (tan x)) |
| 72.0ms | (tan (+ x eps)) |
| 296.0ms | (- (* (+ (tan x) (tan eps)) (cos x)) (* (- 1 (* (tan x) (tan eps))) (sin x))) |
| 268.0ms | (+ (* x (pow eps 2)) (+ eps (* (pow x 2) eps))) |
| 155.0ms | (* (- 1 (* (tan x) (tan eps))) (cos x)) |
| 47.0ms | (+ x (+ (* 1/3 (pow x 3)) eps)) |
| 42.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: 17.2b
Found 4 expressions with local error:
| 2.9b | (- (/ (+ (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)))) |
| 102× | *-un-lft-identity |
| 71× | add-sqr-sqrt |
| 66× | add-cube-cbrt |
| 61× | times-frac |
| 54× | prod-diff |
| 18× | fma-neg |
| 17× | distribute-lft-out |
| 10× | associate-/r/ |
| 9× | tan-quot |
| 8× | add-log-exp |
| 8× | add-exp-log |
| 8× | add-cbrt-cube |
| 6× | flip-- |
| 6× | flip3-- |
| 6× | pow1 |
| 5× | div-inv |
| 4× | associate-/l* |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | associate-/l/ |
| 3× | associate-*l* |
| 3× | associate-*r* |
| 3× | fma-def |
| 3× | associate-/r* |
| 2× | difference-of-squares |
| 2× | flip-+ |
| 2× | frac-add |
| 2× | flip3-+ |
| 1× | distribute-lft-out-- |
| 1× | cbrt-unprod |
| 1× | frac-sub |
| 1× | *-commutative |
| 1× | associate-*r/ |
| 1× | prod-exp |
| 1× | associate-*l/ |
| 1× | pow-prod-down |
| 1× | div-exp |
| 1× | diff-log |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | clear-num |
| 1× | +-commutative |
| 1× | cbrt-undiv |
| 1× | frac-times |
| 63.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 20.0ms | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
| 8.0ms | (* (tan x) (tan eps)) |
| 8.0ms | (+ (tan x) (tan eps)) |
| 397.0ms | (- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x)) |
| 271.0ms | (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) |
| 127.0ms | (* (tan x) (tan eps)) |
| 118.0ms | (+ (tan x) (tan eps)) |
| 510.0ms | (fma (/ (+ (tan x) (tan eps)) (- (* 1 1) (* (* (tan x) (tan eps)) (* (tan x) (tan eps))))) (+ 1 (* (tan x) (tan eps))) (- (* (cbrt (tan x)) (* (cbrt (tan x)) (cbrt (tan x)))))) |
| 490.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))))) |
| 485.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))) |
| 472.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))))) |
| 465.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))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 17.0b
Found 4 expressions with local error:
| 2.9b | (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)))) |
| 10× | *-un-lft-identity |
| 8× | add-cube-cbrt |
| 8× | add-sqr-sqrt |
| 7× | add-exp-log |
| 7× | pow1 |
| 6× | add-log-exp |
| 6× | tan-quot |
| 6× | add-cbrt-cube |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | associate-*l* |
| 3× | associate-*r* |
| 3× | fma-def |
| 3× | associate-/r* |
| 2× | associate-/r/ |
| 1× | inv-pow |
| 1× | distribute-lft-out |
| 1× | flip-- |
| 1× | pow-flip |
| 1× | div-inv |
| 1× | fma-udef |
| 1× | flip-+ |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | associate-*r/ |
| 1× | prod-exp |
| 1× | frac-add |
| 1× | associate-*l/ |
| 1× | pow-prod-down |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | frac-2neg |
| 1× | sum-log |
| 1× | clear-num |
| 1× | rec-exp |
| 1× | +-commutative |
| 1× | frac-times |
| 4.0ms | (* (tan x) (tan eps)) |
| 4.0ms | (+ (tan x) (tan eps)) |
| 1.0ms | (/ 1 (- 1 (* (tan x) (tan eps)))) |
| 0.0ms | (fma (+ (tan x) (tan eps)) (/ 1 (- 1 (* (tan x) (tan eps)))) (- (tan x))) |
| 363.0ms | (fma (+ (tan x) (tan eps)) (/ 1 (- 1 (* (tan x) (tan eps)))) (- (tan x))) |
| 172.0ms | (/ 1 (- 1 (* (tan x) (tan eps)))) |
| 133.0ms | (* (tan x) (tan eps)) |
| 131.0ms | (+ (tan x) (tan eps)) |
| 283.0ms | (- (+ (/ (sin eps) (* (cos eps) (- 1 (/ (* (sin x) (sin eps)) (* (cos x) (cos eps)))))) (/ (sin x) (* (cos x) (- 1 (/ (* (sin x) (sin eps)) (* (cos x) (cos eps))))))) (/ (sin x) (cos x))) |
| 227.0ms | (- (+ (/ (sin eps) (* (cos eps) (- 1 (/ (* (sin x) (sin eps)) (* (cos x) (cos eps)))))) (/ (sin x) (* (cos x) (- 1 (/ (* (sin x) (sin eps)) (* (cos x) (cos eps))))))) (/ (sin x) (cos x))) |
| 221.0ms | (+ (* x (pow eps 2)) (+ eps (* (pow x 2) eps))) |
| 209.0ms | (+ (* 1/3 (* (pow x 3) eps)) (+ (* 1/3 (* x (pow eps 3))) (* x eps))) |
| 194.0ms | (+ (* 1 1) (+ (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) (* 1 (* (tan x) (tan eps))))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 17.0b
Found 4 expressions with local error:
| 2.9b | (fma (+ (tan x) (tan eps)) (* (/ 1 (- (* 1 1) (* (* (tan x) (tan eps)) (* (tan x) (tan eps))))) (fma (tan eps) (tan x) 1)) (- (tan x))) |
| 0.3b | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 0.2b | (* (tan x) (tan eps)) |
| 0.2b | (* (tan x) (tan eps)) |
| 40× | tan-quot |
| 35× | pow1 |
| 20× | add-exp-log |
| 20× | add-cbrt-cube |
| 19× | frac-times |
| 15× | pow-prod-down |
| 13× | associate-*r/ |
| 13× | associate-*l/ |
| 10× | cbrt-unprod |
| 10× | prod-exp |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 7× | associate-*l* |
| 7× | associate-*r* |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | pow-prod-up |
| 4× | expm1-log1p-u |
| 3× | *-commutative |
| 2× | pow-plus |
| 1× | fma-udef |
| 1× | pow2 |
| 17.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 4.0ms | (* (tan x) (tan eps)) |
| 4.0ms | (* (tan x) (tan eps)) |
| 0.0ms | (fma (+ (tan x) (tan eps)) (* (/ 1 (- (* 1 1) (* (* (tan x) (tan eps)) (* (tan x) (tan eps))))) (fma (tan eps) (tan x) 1)) (- (tan x))) |
| 494.0ms | (fma (+ (tan x) (tan eps)) (* (/ 1 (- (* 1 1) (* (* (tan x) (tan eps)) (* (tan x) (tan eps))))) (fma (tan eps) (tan x) 1)) (- (tan x))) |
| 127.0ms | (* (* (tan x) (tan eps)) (* (tan x) (tan eps))) |
| 86.0ms | (* (tan x) (tan eps)) |
| 81.0ms | (* (tan x) (tan eps)) |
| 416.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)))) |
| 409.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)))) |
| 376.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)))) |
| 258.0ms | (/ (* (pow (sin x) 2) (pow (sin eps) 2)) (* (pow (cos x) 2) (pow (cos eps) 2))) |
| 258.0ms | (/ (* (pow (sin x) 2) (pow (sin eps) 2)) (* (pow (cos x) 2) (pow (cos eps) 2))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 0.2b
0% (0.3b remaining)
Error of 0.6b against oracle of 0.3b and baseline of 0.6b
| 8000× | (pre true 80) |
| 3314× | (body real 1280) |
| 1793× | (body real 640) |
| 1090× | (body real 80) |
| 769× | (body real 320) |
| 664× | (body real 2560) |
| 370× | (body real 160) |