


Bits error versus x



Bits error versus eps
Results
if eps < -0.005208537887765567Initial program 29.9
rmApplied cos-sum0.8
Applied associate--l-0.8
if -0.005208537887765567 < eps < 9.788702847368253e-08Initial program 48.7
rmApplied diff-cos36.7
Simplified0.5
rmApplied expm1-log1p-u0.5
if 9.788702847368253e-08 < eps Initial program 30.4
rmApplied cos-sum1.1
Final simplification0.7
herbie shell --seed 2018365 +o rules:numerics
(FPCore (x eps)
:name "2cos (problem 3.3.5)"
(- (cos (+ x eps)) (cos x)))
Time bar (total: 9.5s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 38.5b
Found 2 expressions with local error:
| 3.2b | (cos (+ x eps)) |
| 0.9b | (- (cos (+ x eps)) (cos x)) |
2 calls. Slowest were:
| 10.0ms | (- (cos (+ x eps)) (cos x)) |
| 3.0ms | (cos (+ x eps)) |
2 calls. Slowest were:
| 87.0ms | (- (cos (+ x eps)) (cos x)) |
| 21.0ms | (cos (+ x eps)) |
33 calls. Slowest were:
| 263.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 176.0ms | (- 1 (+ (* x eps) (* 1/2 (pow x 2)))) |
| 24.0ms | (fma (- (cbrt (cos x))) (* (cbrt (cos x)) (cbrt (cos x))) (* (cbrt (cos x)) (* (cbrt (cos x)) (cbrt (cos x))))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 0.4b
Found 3 expressions with local error:
| 3.1b | (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:
| 12.0ms | (* -2 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 10.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 4.0ms | (sin (/ (+ (+ x x) eps) 2)) |
3 calls. Slowest were:
| 86.0ms | (* -2 (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 73.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 38.0ms | (sin (/ (+ (+ x x) eps) 2)) |
19 calls. Slowest were:
| 378.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 213.0ms | (- (* 1/6 (* (pow x 3) eps)) (+ (* 1/2 (pow eps 2)) (* x eps))) |
| 114.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
14 alts after pruning (14 fresh and 0 done)
Merged error: 0.4b
Found 4 expressions with local error:
| 3.1b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.3b | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 0.2b | (expm1 (log1p (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))))) |
| 0.1b | (log1p (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
4 calls. Slowest were:
| 19.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 9.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 1.0ms | (log1p (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
4 calls. Slowest were:
| 217.0ms | (expm1 (log1p (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))))) |
| 182.0ms | (log1p (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2)))) |
| 80.0ms | (* (sin (/ (+ (+ x x) eps) 2)) (sin (/ eps 2))) |
| 31.0ms | (sin (/ (+ (+ x x) eps) 2)) |
23 calls. Slowest were:
| 372.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 371.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 339.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
13 alts after pruning (12 fresh and 1 done)
Merged error: 0.4b
Found 4 expressions with local error:
| 3.1b | (sin (/ (+ (+ x x) eps) 2)) |
| 0.4b | (log1p (sin (/ (+ (+ x x) eps) 2))) |
| 0.3b | (* (expm1 (log1p (sin (/ (+ (+ x x) eps) 2)))) (sin (/ eps 2))) |
| 0.2b | (expm1 (log1p (sin (/ (+ (+ x x) eps) 2)))) |
4 calls. Slowest were:
| 11.0ms | (* (expm1 (log1p (sin (/ (+ (+ x x) eps) 2)))) (sin (/ eps 2))) |
| 4.0ms | (sin (/ (+ (+ x x) eps) 2)) |
| 0.0ms | (expm1 (log1p (sin (/ (+ (+ x x) eps) 2)))) |
4 calls. Slowest were:
| 129.0ms | (* (expm1 (log1p (sin (/ (+ (+ x x) eps) 2)))) (sin (/ eps 2))) |
| 80.0ms | (expm1 (log1p (sin (/ (+ (+ x x) eps) 2)))) |
| 61.0ms | (log1p (sin (/ (+ (+ x x) eps) 2))) |
| 36.0ms | (sin (/ (+ (+ x x) eps) 2)) |
22 calls. Slowest were:
| 351.0ms | (- (+ (* 1/4 (pow eps 2)) (* 1/2 (* x eps))) (* 1/12 (* (pow x 3) eps))) |
| 100.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
| 84.0ms | (- (+ x (* 1/2 eps)) (* 1/6 (pow x 3))) |
12 alts after pruning (11 fresh and 1 done)
Merged error: 0.4b
97.7% (0.3b remaining)
Error of 0.7b against oracle of 0.4b and baseline of 15.1b