


Bits error versus x



Bits error versus eps
Results
if eps < -7.452743699206042e-09Initial program 30.1
rmApplied cos-sum1.2
if -7.452743699206042e-09 < eps < 0.00191500921306136Initial program 49.0
rmApplied diff-cos37.7
Simplified0.5
if 0.00191500921306136 < eps Initial program 30.0
rmApplied cos-sum0.8
Applied associate--l-0.9
Final simplification0.8
herbie shell --seed 2019010
(FPCore (x eps)
:name "2cos (problem 3.3.5)"
(- (cos (+ x eps)) (cos x)))
Time bar (total: 14.9s)Debug log
| 5.0ms | (- (cos (+ x eps)) (cos x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 39.6b
Found 2 expressions with local error:
| 2.9b | (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)) |
| 44.0ms | (- (cos (+ x eps)) (cos x)) |
| 29.0ms | (cos (+ x eps)) |
| 282.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 73.0ms | (- 1 (+ (* x eps) (* 1/2 (pow x 2)))) |
| 20.0ms | (* (sin (/ (- (+ x eps) x) 2)) (sin (/ (+ (+ x eps) x) 2))) |
| 13.0ms | (/ (exp (cos (+ x eps))) (exp (cos x))) |
| 8.0ms | (- (cos (+ x eps)) (cos x)) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0.6b
Found 2 expressions with local error:
| 2.8b | (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 |
| 18.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 9.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 97.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 25.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 255.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 101.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 83.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)))) |
| 24.0ms | (- (cos (- (/ (+ (+ x x) eps) 2) (/ eps 2))) (cos (+ (/ (+ (+ x x) eps) 2) (/ eps 2)))) |
| 23.0ms | (sin (* 1/2 (+ (* 2 x) eps))) |
14 alts after pruning (13 fresh and 1 done)
Merged error: 0.5b
Found 4 expressions with local error:
| 2.8b | (sin (/ (+ (+ x x) eps) 2)) |
| 2.8b | (sin (/ (+ (+ x x) eps) 2)) |
| 2.8b | (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 |
| 8.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 8.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 6.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 2.0ms | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 95.0ms | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 24.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 24.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 21.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 312.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))))))) |
| 96.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 96.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 84.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 26.0ms | (pow (sin (* 1/2 (+ (* 2 x) eps))) 1/3) |
14 alts after pruning (13 fresh and 1 done)
Merged error: 0.5b
Found 4 expressions with local error:
| 4.8b | (cbrt (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 4.8b | (cbrt (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 4.8b | (cbrt (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 2.8b | (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 |
| 3× | sin-mult |
| 3× | pow1/3 |
| 3× | cbrt-div |
| 3× | cbrt-prod |
| 7.0ms | (cbrt (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 6.0ms | (cbrt (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 4.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 4.0ms | (cbrt (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 148.0ms | (cbrt (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 134.0ms | (cbrt (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 130.0ms | (cbrt (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 27.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 309.0ms | (- (+ (exp (* 1/3 (+ (* 2 (log eps)) (log 1/4)))) (* 1/3 (* x (exp (* 1/3 (- (log 2) (log eps))))))) (* 13/162 (* (pow x 2) (exp (* 1/3 (+ (* 2 (log eps)) (log 1/4))))))) |
| 302.0ms | (- (+ (exp (* 1/3 (+ (* 2 (log eps)) (log 1/4)))) (* 1/3 (* x (exp (* 1/3 (- (log 2) (log eps))))))) (* 13/162 (* (pow x 2) (exp (* 1/3 (+ (* 2 (log eps)) (log 1/4))))))) |
| 270.0ms | (- (+ (exp (* 1/3 (+ (* 2 (log eps)) (log 1/4)))) (* 1/3 (* x (exp (* 1/3 (- (log 2) (log eps))))))) (* 13/162 (* (pow x 2) (exp (* 1/3 (+ (* 2 (log eps)) (log 1/4))))))) |
| 46.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 27.0ms | (cbrt (- (cos (- (/ (+ (+ x x) eps) 2) (/ eps 2))) (cos (+ (/ (+ (+ x x) eps) 2) (/ eps 2))))) |
14 alts after pruning (12 fresh and 2 done)
Merged error: 0.5b
97.5% (0.4b remaining)
Error of 0.8b against oracle of 0.4b and baseline of 14.7b