


Bits error versus x



Bits error versus eps
Results
if eps < -0.017159707841805674 or 2.1517152137045746e-05 < eps Initial program 30.0
Initial simplification30.0
rmApplied cos-sum0.9
Applied associate--l-0.9
if -0.017159707841805674 < eps < 2.1517152137045746e-05Initial program 50.3
Initial simplification50.3
rmApplied diff-cos38.7
Simplified0.6
rmApplied associate-*r*0.5
rmApplied expm1-log1p-u0.6
Final simplification0.7
herbie shell --seed 2018360 +o rules:numerics
(FPCore (x eps)
:name "2cos (problem 3.3.5)"
(- (cos (+ x eps)) (cos x)))
Time bar (total: 8.5s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 36.1b
Found 2 expressions with local error:
| 3.3b | (cos (+ eps x)) |
| 2.0b | (- (cos (+ eps x)) (cos x)) |
2 calls. Slowest were:
| 5.0ms | (- (cos (+ eps x)) (cos x)) |
| 2.0ms | (cos (+ eps x)) |
2 calls. Slowest were:
| 105.0ms | (- (cos (+ eps x)) (cos x)) |
| 16.0ms | (cos (+ eps x)) |
33 calls. Slowest were:
| 178.0ms | (- (* 1/24 (pow eps 4)) (+ (* x eps) (* 1/2 (pow eps 2)))) |
| 155.0ms | (- 1 (+ (* x eps) (* 1/2 (pow eps 2)))) |
| 33.0ms | (fma 1 (cos (+ eps x)) (- (* (cos x) 1))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 0.3b
Found 3 expressions with local error:
| 3.5b | (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)))) |
3 calls. Slowest were:
| 25.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 14.0ms | (* -2 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 9.0ms | (sin (/ (+ (+ x x) eps) 2)) |
3 calls. Slowest were:
| 103.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 99.0ms | (* -2 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 34.0ms | (sin (/ (+ (+ x x) eps) 2)) |
19 calls. Slowest were:
| 511.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 311.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 80.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
14 alts after pruning (14 fresh and 0 done)
Merged error: 0.3b
Found 2 expressions with local error:
| 3.5b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.3b | (* (* -2 (sin (/ (+ (+ x x) eps) 2))) (sin (/ eps 2))) |
2 calls. Slowest were:
| 28.0ms | (* (* -2 (sin (/ (+ (+ x x) eps) 2))) (sin (/ eps 2))) |
| 9.0ms | (sin (/ (+ (+ x x) eps) 2)) |
2 calls. Slowest were:
| 82.0ms | (* (* -2 (sin (/ (+ (+ x x) eps) 2))) (sin (/ eps 2))) |
| 35.0ms | (sin (/ (+ (+ x x) eps) 2)) |
12 calls. Slowest were:
| 477.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 256.0ms | (* (* (* (* -2 (sin (/ (+ (+ x x) eps) 2))) (* -2 (sin (/ (+ (+ x x) eps) 2)))) (* -2 (sin (/ (+ (+ x x) eps) 2)))) (* (* (sin (/ eps 2)) (sin (/ eps 2))) (sin (/ eps 2)))) |
| 89.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
13 alts after pruning (13 fresh and 0 done)
Merged error: 0.3b
Found 4 expressions with local error:
| 3.5b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.3b | (* (* -2 (log1p (expm1 (sin (/ (+ (+ x x) eps) 2))))) (sin (/ eps 2))) |
| 0.3b | (log1p (expm1 (sin (/ (+ (+ x x) eps) 2)))) |
| 0.2b | (expm1 (sin (/ (+ (+ x x) eps) 2))) |
4 calls. Slowest were:
| 12.0ms | (* (* -2 (log1p (expm1 (sin (/ (+ (+ x x) eps) 2))))) (sin (/ eps 2))) |
| 8.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 1.0ms | (expm1 (sin (/ (+ (+ x x) eps) 2))) |
4 calls. Slowest were:
| 200.0ms | (* (* -2 (log1p (expm1 (sin (/ (+ (+ x x) eps) 2))))) (sin (/ eps 2))) |
| 80.0ms | (log1p (expm1 (sin (/ (+ (+ x x) eps) 2)))) |
| 53.0ms | (expm1 (sin (/ (+ (+ x x) eps) 2))) |
| 36.0ms | (sin (/ (+ (+ x x) eps) 2)) |
20 calls. Slowest were:
| 518.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 239.0ms | (* (* (* (* -2 (log1p (expm1 (sin (/ (+ (+ x x) eps) 2))))) (* -2 (log1p (expm1 (sin (/ (+ (+ x x) eps) 2)))))) (* -2 (log1p (expm1 (sin (/ (+ (+ x x) eps) 2)))))) (* (* (sin (/ eps 2)) (sin (/ eps 2))) (sin (/ eps 2)))) |
| 150.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 0.3b
97.3% (0.4b remaining)
Error of 0.7b against oracle of 0.4b and baseline of 14.8b