


Bits error versus x



Bits error versus eps
Results
if eps < -4.7184081031776776e-05Initial program 30.0
rmApplied cos-sum0.9
if -4.7184081031776776e-05 < eps < 0.41130289542898757Initial program 49.2
rmApplied diff-cos38.3
Simplified0.6
if 0.41130289542898757 < eps Initial program 29.0
rmApplied cos-sum0.8
Applied associate--l-0.9
Final simplification0.8
herbie shell --seed 323378853
(FPCore (x eps)
:name "2cos (problem 3.3.5)"
(- (cos (+ x eps)) (cos x)))
Time bar (total: 19.7s)Debug log
| 202.0ms | 151× | body | 1280 | valid |
| 46.0ms | 51× | body | 640 | valid |
| 44.0ms | 19× | body | 2560 | valid |
| 15.0ms | 24× | body | 320 | valid |
| 3.0ms | 8× | body | 160 | valid |
| 1.0ms | 3× | body | 80 | valid |
| 8.0ms | (- (cos (+ x eps)) (cos x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 40.1b
Found 2 expressions with local error:
| 3.6b | (cos (+ x eps)) |
| 0.7b | (- (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- |
| 11.0ms | (- (cos (+ x eps)) (cos x)) |
| 4.0ms | (cos (+ x eps)) |
| 85.0ms | (- (cos (+ x eps)) (cos x)) |
| 28.0ms | (cos (+ x eps)) |
| 354.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 145.0ms | (- 1 (+ (* x eps) (* 1/2 (pow x 2)))) |
| 42.0ms | (* (sin (/ (- (+ x eps) x) 2)) (sin (/ (+ (+ x eps) x) 2))) |
| 28.0ms | (/ (exp (cos (+ x eps))) (exp (cos x))) |
| 10.0ms | (- (sqrt (cos (+ x eps))) (sqrt (cos x))) |
5 alts after pruning (5 fresh and 0 done)
Merged error: 0.4b
Found 2 expressions with local error:
| 3.6b | (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 |
| 23.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 11.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 134.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 42.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 356.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 121.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)))) |
| 104.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 27.0ms | (* (sin (* 1/2 (+ (* 2 x) eps))) (sin (* 1/2 eps))) |
| 27.0ms | (* (sin (* 1/2 (+ (* 2 x) eps))) (sin (* 1/2 eps))) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 0.3b
Found 4 expressions with local error:
| 3.6b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.6b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.6b | (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 |
| 14.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 10.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 10.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 5.0ms | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 154.0ms | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 42.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 42.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 41.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 438.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))))))) |
| 105.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 103.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 103.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 30.0ms | (pow (sin (* 1/2 (+ (* 2 x) eps))) 1/3) |
12 alts after pruning (11 fresh and 1 done)
Merged error: 0.3b
Found 4 expressions with local error:
| 3.6b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.6b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.6b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.6b | (sin (/ (+ (+ x x) eps) 2)) |
| 4× | add-log-exp |
| 4× | add-cube-cbrt |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | *-un-lft-identity |
| 4× | pow1 |
| 4× | add-sqr-sqrt |
| 15.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 11.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 10.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 10.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 44.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 43.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 42.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 41.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 107.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 106.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 105.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 102.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 24.0ms | (sin (* 1/2 (+ (* 2 x) eps))) |
12 alts after pruning (10 fresh and 2 done)
Merged error: 0.3b
97.5% (0.4b remaining)
Error of 0.8b against oracle of 0.4b and baseline of 14.9b
| 6.2s | 4449× | body | 1280 | valid |
| 2.3s | 1885× | body | 640 | valid |
| 2.2s | 670× | body | 2560 | valid |
| 493.0ms | 647× | body | 320 | valid |
| 117.0ms | 277× | body | 160 | valid |
| 15.0ms | 72× | body | 80 | valid |