


Bits error versus x



Bits error versus eps
Results
Initial program 39.8
rmApplied diff-cos34.4
Simplified15.6
Taylor expanded around -inf 15.6
Simplified15.6
rmApplied sin-sum0.4
rmApplied flip-+0.4
Final simplification0.4
herbie shell --seed 1137770271
(FPCore (x eps)
:name "2cos (problem 3.3.5)"
(- (cos (+ x eps)) (cos x)))
Time bar (total: 26.9s)Debug log
| 146× | 276.0ms | (body real 1280) |
| 57× | 68.0ms | (body real 640) |
| 21× | 67.0ms | (body real 2560) |
| 23× | 21.0ms | (body real 320) |
| 256× | 10.0ms | (pre true 80) |
| 8× | 4.0ms | (body real 160) |
| 1× | 0.0ms | (body real 80) |
| 10.0ms | (- (cos (+ x eps)) (cos x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 41.1b
Found 2 expressions with local error:
| 3.4b | (cos (+ x eps)) |
| 1.0b | (- (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- |
| 12.0ms | (- (cos (+ x eps)) (cos x)) |
| 4.0ms | (cos (+ x eps)) |
| 145.0ms | (- (cos (+ x eps)) (cos x)) |
| 32.0ms | (cos (+ x eps)) |
| 578.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 212.0ms | (- 1 (+ (* x eps) (* 1/2 (pow x 2)))) |
| 62.0ms | (* (sin (/ (- (+ x eps) x) 2)) (sin (/ (+ (+ x eps) x) 2))) |
| 38.0ms | (/ (exp (cos (+ x eps))) (exp (cos x))) |
| 22.0ms | (- (cos (+ x eps)) (cos x)) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 0.5b
Found 3 expressions with local error:
| 3.3b | (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 |
| 27.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 22.0ms | (* -2 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 13.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 164.0ms | (* -2 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 153.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 56.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 405.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 384.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 125.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)))) |
| 107.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 42.0ms | (* -2 (* (sin (* 1/2 (+ (* 2 x) eps))) (sin (* 1/2 eps)))) |
14 alts after pruning (14 fresh and 0 done)
Merged error: 0.4b
Found 2 expressions with local error:
| 3.3b | (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 |
| 25.0ms | (* (sin (+ x (* eps 1/2))) (* -2 (sin (* eps 1/2)))) |
| 5.0ms | (sin (+ x (* eps 1/2))) |
| 570.0ms | (* (sin (+ x (* eps 1/2))) (* -2 (sin (* eps 1/2)))) |
| 43.0ms | (sin (+ x (* eps 1/2))) |
| 394.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 290.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))))) |
| 111.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 29.0ms | (+ (log (sin (+ x (* eps 1/2)))) (log (* -2 (sin (* eps 1/2))))) |
| 25.0ms | (* (sin (+ x (* eps 1/2))) (* -2 (sin (* eps 1/2)))) |
13 alts after pruning (13 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))) (* (cos x) (sin (* eps 1/2)))) |
| 0.1b | (* (sin x) (cos (* 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 |
| 67.0ms | (* (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) (* -2 (sin (* eps 1/2)))) |
| 24.0ms | (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) |
| 15.0ms | (* (cos x) (sin (* eps 1/2))) |
| 14.0ms | (* (sin x) (cos (* eps 1/2))) |
| 334.0ms | (* (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) (* -2 (sin (* eps 1/2)))) |
| 196.0ms | (+ (* (sin x) (cos (* eps 1/2))) (* (cos x) (sin (* eps 1/2)))) |
| 100.0ms | (* (cos x) (sin (* eps 1/2))) |
| 90.0ms | (* (sin x) (cos (* eps 1/2))) |
| 529.0ms | (- x (+ (* 1/8 (* x (pow eps 2))) (* 1/6 (pow x 3)))) |
| 468.0ms | (- (* 1/2 eps) (+ (* 1/4 (* (pow x 2) eps)) (* 1/48 (pow eps 3)))) |
| 367.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 262.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)))) |
| 258.0ms | (* (+ (pow (* (sin x) (cos (* eps 1/2))) 3) (pow (* (cos x) (sin (* eps 1/2))) 3)) (* -2 (sin (* eps 1/2)))) |
18 alts after pruning (18 fresh and 0 done)
Merged error: 0.0b
0% (0.4b remaining)
Error of 0.4b against oracle of 0.0b and baseline of 0.4b
| 4400× | 7.5s | (body real 1280) |
| 1887× | 2.5s | (body real 640) |
| 635× | 1.7s | (body real 2560) |
| 713× | 546.0ms | (body real 320) |
| 296× | 249.0ms | (body real 160) |
| 8000× | 242.0ms | (pre true 80) |
| 69× | 16.0ms | (body real 80) |