


Bits error versus x



Bits error versus eps
Results
if eps < -3.3020901580082745e-05 or 0.02011113661874671 < eps Initial program 29.8
rmApplied cos-sum0.9
if -3.3020901580082745e-05 < eps < 0.02011113661874671Initial program 49.5
rmApplied diff-cos37.9
Simplified0.6
Final simplification0.7
herbie shell --seed 2019002 +o rules:numerics
(FPCore (x eps)
:name "2cos (problem 3.3.5)"
(- (cos (+ x eps)) (cos x)))
Time bar (total: 17.0s)Debug log
1 calls. Slowest were:
| 8.0ms | (- (cos (+ x eps)) (cos x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 37.0b
Found 2 expressions with local error:
| 3.4b | (cos (+ x eps)) |
| 1.5b | (- (cos (+ x eps)) (cos x)) |
2 calls. Slowest were:
| 453.0ms | (- (cos (+ x eps)) (cos x)) |
| 3.0ms | (cos (+ x eps)) |
2 calls. Slowest were:
| 53.0ms | (- (cos (+ x eps)) (cos x)) |
| 28.0ms | (cos (+ x eps)) |
33 calls. Slowest were:
| 265.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 173.0ms | (- 1 (+ (* x eps) (* 1/2 (pow x 2)))) |
| 38.0ms | (fma 1 (cos (+ x eps)) (- (* (cos x) 1))) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 0.2b
Found 2 expressions with local error:
| 3.4b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.3b | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
2 calls. Slowest were:
| 18.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 8.0ms | (sin (/ (+ (+ x x) eps) 2)) |
2 calls. Slowest were:
| 91.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 36.0ms | (sin (/ (+ (+ x x) eps) 2)) |
15 calls. Slowest were:
| 344.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 102.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 81.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)))) |
14 alts after pruning (13 fresh and 1 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 3.4b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.3b | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 0.2b | (expm1 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 0.2b | (log1p (expm1 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))))) |
4 calls. Slowest were:
| 10.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 5.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 0.0ms | (expm1 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
4 calls. Slowest were:
| 185.0ms | (log1p (expm1 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))))) |
| 166.0ms | (expm1 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 95.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 25.0ms | (sin (/ (+ (+ x x) eps) 2)) |
23 calls. Slowest were:
| 445.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 404.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 370.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
12 alts after pruning (11 fresh and 1 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 3.4b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.4b | (sin (/ (+ (+ x x) eps) 2)) |
| 3.4b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.6b | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
4 calls. Slowest were:
| 5.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 5.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 5.0ms | (sin (/ (+ (+ x x) eps) 2)) |
4 calls. Slowest were:
| 75.0ms | (cbrt (sin (/ (+ (+ x x) eps) 2))) |
| 29.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 21.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 20.0ms | (sin (/ (+ (+ x x) eps) 2)) |
15 calls. Slowest were:
| 151.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))))))) |
| 128.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 117.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
12 alts after pruning (11 fresh and 1 done)
Merged error: 0.2b
97.8% (0.3b remaining)
Error of 0.7b against oracle of 0.4b and baseline of 14.9b