


Bits error versus x



Bits error versus eps
Results
if eps < -34.54208403880926 or 2.7525704418554514e-08 < eps Initial program 30.0
rmApplied cos-sum0.9
if -34.54208403880926 < eps < 2.7525704418554514e-08Initial program 48.8
rmApplied diff-cos37.6
Simplified0.6
Final simplification0.8
herbie shell --seed 2019021
(FPCore (x eps)
:name "2cos (problem 3.3.5)"
(- (cos (+ x eps)) (cos x)))
Time bar (total: 13.3s)Debug log
| 157.0ms | 142× | body | 1280 | valid |
| 39.0ms | 23× | body | 2560 | valid |
| 34.0ms | 58× | body | 640 | valid |
| 7.0ms | 17× | body | 320 | valid |
| 4.0ms | 14× | body | 160 | valid |
| 0.0ms | 2× | body | 80 | valid |
| 3.0ms | (- (cos (+ x eps)) (cos x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 40.5b
Found 2 expressions with local error:
| 3.7b | (cos (+ x eps)) |
| 1.4b | (- (cos (+ x eps)) (cos x)) |
| 4× | add-log-exp |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 2× | add-cube-cbrt |
| 2× | add-exp-log |
| 2× | add-cbrt-cube |
| 2× | cos-sum |
| 2× | pow1 |
| 1× | difference-of-squares |
| 1× | distribute-lft-out-- |
| 1× | flip-- |
| 1× | diff-cos |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | associate--l- |
| 7.0ms | (- (cos (+ x eps)) (cos x)) |
| 3.0ms | (cos (+ x eps)) |
| 62.0ms | (- (cos (+ x eps)) (cos x)) |
| 14.0ms | (cos (+ x eps)) |
| 193.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 79.0ms | (- 1 (+ (* x eps) (* 1/2 (pow x 2)))) |
| 24.0ms | (/ (exp (cos (+ x eps))) (exp (cos x))) |
| 20.0ms | (* (sin (/ (- (+ x eps) x) 2)) (sin (/ (+ (+ x eps) x) 2))) |
| 8.0ms | (- (sqrt (cos (+ x eps))) (sqrt (cos x))) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0.5b
Found 2 expressions with local error:
| 3.5b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.3b | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 4× | add-cube-cbrt |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | *-un-lft-identity |
| 4× | pow1 |
| 4× | add-sqr-sqrt |
| 3× | associate-*l* |
| 3× | associate-*r* |
| 2× | add-log-exp |
| 1× | sin-mult |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 13.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 4.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 81.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 28.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 210.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 72.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 62.0ms | (* (* (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ (+ (+ x x) eps) 2))) (sin (/ (+ (+ x x) eps) 2))) (* (* (sin (/ eps 2)) (sin (/ eps 2))) (sin (/ eps 2)))) |
| 23.0ms | (- (cos (- (/ (+ (+ x x) eps) 2) (/ eps 2))) (cos (+ (/ (+ (+ x x) eps) 2) (/ eps 2)))) |
| 22.0ms | (* (sin (* 1/2 (+ (* 2 x) eps))) (sin (* 1/2 eps))) |
13 alts after pruning (12 fresh and 1 done)
Merged error: 0.4b
Found 4 expressions with local error:
| 3.5b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.5b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.5b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.6b | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 5× | add-sqr-sqrt |
| 4× | add-log-exp |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 3× | cbrt-prod |
| 1× | pow1/3 |
| 5.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 4.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 4.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 4.0ms | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 82.0ms | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 33.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 32.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 20.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 350.0ms | (- (+ (* 1/3 (* x (exp (* 1/3 (- (log 4) (* 2 (log eps))))))) (exp (* 1/3 (+ (log 1/2) (log eps))))) (* 7/81 (* (pow x 2) (exp (* 1/3 (+ (log 1/2) (log eps))))))) |
| 77.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 60.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 53.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 23.0ms | (sin (* 1/2 (+ (* 2 x) eps))) |
14 alts after pruning (13 fresh and 1 done)
Merged error: 0.4b
Found 4 expressions with local error:
| 3.5b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.5b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.5b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.6b | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 5× | add-sqr-sqrt |
| 4× | add-log-exp |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 3× | cbrt-prod |
| 1× | pow1/3 |
| 6.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 4.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 4.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 2.0ms | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 90.0ms | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 37.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 34.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 32.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 299.0ms | (- (+ (* 1/3 (* x (exp (* 1/3 (- (log 4) (* 2 (log eps))))))) (exp (* 1/3 (+ (log 1/2) (log eps))))) (* 7/81 (* (pow x 2) (exp (* 1/3 (+ (log 1/2) (log eps))))))) |
| 59.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 53.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 53.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 23.0ms | (pow (sin (* 1/2 (+ (* 2 x) eps))) 1/3) |
14 alts after pruning (12 fresh and 2 done)
Merged error: 0.4b
97.2% (0.4b remaining)
Error of 0.8b against oracle of 0.4b and baseline of 14.8b
| 4.7s | 4454× | body | 1280 | valid |
| 1.5s | 638× | body | 2560 | valid |
| 1.2s | 1831× | body | 640 | valid |
| 298.0ms | 708× | body | 320 | valid |
| 68.0ms | 288× | body | 160 | valid |
| 10.0ms | 81× | body | 80 | valid |