


Bits error versus x



Bits error versus eps
Results
Initial program 39.6
rmApplied diff-cos34.0
Simplified15.0
Taylor expanded around inf 15.0
Simplified15.0
rmApplied sin-sum0.4
rmApplied add-cube-cbrt0.9
Final simplification0.9
herbie shell --seed 2019016
(FPCore (x eps)
:name "2cos (problem 3.3.5)"
(- (cos (+ x eps)) (cos x)))
Time bar (total: 16.0s)Debug log
| 256× | (pre true 80) |
| 145× | (body real 1280) |
| 57× | (body real 640) |
| 27× | (body real 2560) |
| 16× | (body real 320) |
| 8× | (body real 160) |
| 3× | (body real 80) |
| 7.0ms | (- (cos (+ x eps)) (cos x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 37.5b
Found 2 expressions with local error:
| 4.0b | (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- |
| 5.0ms | (- (cos (+ x eps)) (cos x)) |
| 2.0ms | (cos (+ x eps)) |
| 63.0ms | (- (cos (+ x eps)) (cos x)) |
| 22.0ms | (cos (+ x eps)) |
| 270.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 92.0ms | (- 1 (+ (* x eps) (* 1/2 (pow x 2)))) |
| 31.0ms | (* (sin (/ (- (+ x eps) x) 2)) (sin (/ (+ (+ x eps) x) 2))) |
| 18.0ms | (/ (exp (cos (+ x eps))) (exp (cos x))) |
| 4.0ms | (- (sqrt (cos (+ x eps))) (sqrt (cos x))) |
7 alts after pruning (7 fresh and 0 done)
Merged error: 0.4b
Found 3 expressions with local error:
| 4.0b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.3b | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 0.0b | (* -2 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 5× | add-cube-cbrt |
| 5× | add-exp-log |
| 5× | add-cbrt-cube |
| 5× | *-un-lft-identity |
| 5× | pow1 |
| 5× | add-sqr-sqrt |
| 4× | associate-*r* |
| 3× | add-log-exp |
| 3× | associate-*l* |
| 2× | sin-mult |
| 2× | *-commutative |
| 1× | cbrt-unprod |
| 1× | associate-*r/ |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 10.0ms | (* -2 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 9.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 4.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 118.0ms | (* -2 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 107.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 36.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 279.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 258.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 95.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)))) |
| 48.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 27.0ms | (* (sin (* 1/2 (+ (* 2 x) eps))) (sin (* 1/2 eps))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 0.3b
Found 2 expressions with local error:
| 4.0b | (sin (+ x (* eps 1/2))) |
| 0.3b | (* (sin (+ x (* eps 1/2))) (* -2 (sin (* eps 1/2)))) |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 3× | add-cube-cbrt |
| 3× | associate-*l* |
| 3× | *-un-lft-identity |
| 3× | add-sqr-sqrt |
| 2× | add-log-exp |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | associate-*r* |
| 1× | sin-sum |
| 18.0ms | (* (sin (+ x (* eps 1/2))) (* -2 (sin (* eps 1/2)))) |
| 4.0ms | (sin (+ x (* eps 1/2))) |
| 83.0ms | (* (sin (+ x (* eps 1/2))) (* -2 (sin (* eps 1/2)))) |
| 38.0ms | (sin (+ x (* eps 1/2))) |
| 323.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 220.0ms | (* (* (* (sin (+ x (* eps 1/2))) (sin (+ x (* eps 1/2)))) (sin (+ x (* eps 1/2)))) (* (* (* -2 (sin (* eps 1/2))) (* -2 (sin (* eps 1/2)))) (* -2 (sin (* eps 1/2))))) |
| 72.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 27.0ms | (+ (log (sin (+ x (* eps 1/2)))) (log (* -2 (sin (* eps 1/2))))) |
| 22.0ms | (* -2 (* (sin (+ x (* 1/2 eps))) (sin (* 1/2 eps)))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 0.3b | (* (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) (* -2 (sin (* eps 1/2)))) |
| 0.2b | (* (cos x) (sin (* eps 1/2))) |
| 0.1b | (* (sin x) (cos (* eps 1/2))) |
| 0.1b | (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) |
| 10× | add-exp-log |
| 10× | add-cbrt-cube |
| 10× | pow1 |
| 9× | add-cube-cbrt |
| 9× | associate-*l* |
| 9× | *-un-lft-identity |
| 9× | add-sqr-sqrt |
| 7× | associate-*r* |
| 6× | add-log-exp |
| 3× | cbrt-unprod |
| 3× | *-commutative |
| 3× | prod-exp |
| 3× | pow-prod-down |
| 2× | flip-+ |
| 2× | associate-*l/ |
| 2× | flip3-+ |
| 1× | sin-cos-mult |
| 1× | sum-log |
| 1× | +-commutative |
| 45.0ms | (* (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) (* -2 (sin (* eps 1/2)))) |
| 18.0ms | (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) |
| 11.0ms | (* (cos x) (sin (* eps 1/2))) |
| 10.0ms | (* (sin x) (cos (* eps 1/2))) |
| 196.0ms | (* (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) (* -2 (sin (* eps 1/2)))) |
| 117.0ms | (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) |
| 74.0ms | (* (cos x) (sin (* eps 1/2))) |
| 72.0ms | (* (sin x) (cos (* eps 1/2))) |
| 342.0ms | (- x (+ (* 1/8 (* x (pow eps 2))) (* 1/6 (pow x 3)))) |
| 339.0ms | (- (* 1/2 eps) (+ (* 1/4 (* (pow x 2) eps)) (* 1/48 (pow eps 3)))) |
| 248.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 185.0ms | (* (- (* (* (sin x) (cos (* eps 1/2))) (* (sin x) (cos (* eps 1/2)))) (* (* (cos x) (sin (* eps 1/2))) (* (cos x) (sin (* eps 1/2))))) (* -2 (sin (* eps 1/2)))) |
| 144.0ms | (* -2 (* (sin (* 1/2 eps)) (+ (* (sin x) (cos (* 1/2 eps))) (* (cos x) (sin (* 1/2 eps)))))) |
16 alts after pruning (16 fresh and 0 done)
Merged error: 0.0b
0% (0.8b remaining)
Error of 0.9b against oracle of 0.0b and baseline of 0.9b
| 8000× | (pre true 80) |
| 4433× | (body real 1280) |
| 1827× | (body real 640) |
| 709× | (body real 320) |
| 664× | (body real 2560) |
| 277× | (body real 160) |
| 90× | (body real 80) |