



Bits error versus x
Results
| Original | 30.1 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 30.1
rmApplied flip--29.9
Taylor expanded around 0 0.2
Final simplification0.2
herbie shell --seed 2019002 +o rules:numerics
(FPCore (x)
:name "2sqrt (example 3.1)"
:herbie-target
(/ 1 (+ (sqrt (+ x 1)) (sqrt x)))
(- (sqrt (+ x 1)) (sqrt x)))
Time bar (total: 11.3s)Debug log
1 calls. Slowest were:
| 8.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 32.4b
Found 1 expressions with local error:
| 3.3b | (- (sqrt (+ x 1)) (sqrt x)) |
1 calls. Slowest were:
| 13.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
1 calls. Slowest were:
| 29.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
50 calls. Slowest were:
| 43.0ms | (fma (sqrt (sqrt (+ x 1))) (sqrt (sqrt (+ x 1))) (- (* (sqrt (sqrt x)) (sqrt (sqrt x))))) |
| 36.0ms | (fma (sqrt 1) (sqrt (+ x 1)) (- (* (sqrt x) 1))) |
| 32.0ms | (fma (- (cbrt (sqrt x))) (* (cbrt (sqrt x)) (cbrt (sqrt x))) (* (cbrt (sqrt x)) (* (cbrt (sqrt x)) (cbrt (sqrt x))))) |
7 alts after pruning (7 fresh and 0 done)
Merged error: 31.6b
Found 4 expressions with local error:
| 2.7b | (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) |
| 0.6b | (* (sqrt x) (sqrt x)) |
| 0.3b | (* (sqrt (+ x 1)) (sqrt (+ x 1))) |
| 0.0b | (/ (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ x 1)) (sqrt x))) |
4 calls. Slowest were:
| 30.0ms | (/ (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 18.0ms | (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) |
| 5.0ms | (* (sqrt (+ x 1)) (sqrt (+ x 1))) |
4 calls. Slowest were:
| 38.0ms | (/ (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 15.0ms | (* (sqrt (+ x 1)) (sqrt (+ x 1))) |
| 12.0ms | (* (sqrt x) (sqrt x)) |
| 12.0ms | (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) |
111 calls. Slowest were:
| 723.0ms | (- (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt (+ x 1)) (sqrt (+ x 1)))) (* (* (sqrt x) (sqrt x)) (* (sqrt x) (sqrt x)))) |
| 277.0ms | (* (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1))) (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1)))) |
| 177.0ms | (- (pow (* (sqrt (+ x 1)) (sqrt (+ x 1))) 3) (pow (* (sqrt x) (sqrt x)) 3)) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 0.2b | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 0.0b | (+ (sqrt (+ x 1)) (sqrt x)) |
2 calls. Slowest were:
| 9.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
| 7.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
2 calls. Slowest were:
| 36.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 34.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
20 calls. Slowest were:
| 121.0ms | (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x)))) |
| 8.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 7.0ms | (* (exp (sqrt (+ x 1))) (exp (sqrt x))) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.3b | (cbrt (+ x 1)) |
| 0.3b | (cbrt (+ 1 x)) |
| 0.2b | (/ 1 (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1))) (sqrt x))) |
| 0.1b | (sqrt (cbrt (+ x 1))) |
4 calls. Slowest were:
| 2.0ms | (sqrt (cbrt (+ x 1))) |
| 1.0ms | (/ 1 (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1))) (sqrt x))) |
| 1.0ms | (cbrt (+ x 1)) |
4 calls. Slowest were:
| 83.0ms | (/ 1 (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1))) (sqrt x))) |
| 41.0ms | (cbrt (+ x 1)) |
| 34.0ms | (cbrt (+ 1 x)) |
| 32.0ms | (sqrt (cbrt (+ x 1))) |
36 calls. Slowest were:
| 248.0ms | (- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2)))) |
| 238.0ms | (- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2)))) |
| 218.0ms | (- (+ (exp (* 1/6 (- (log -1) (log (/ -1 x))))) (* 1/6 (/ (exp (* 1/6 (- (log -1) (log (/ -1 x))))) x))) (* 5/72 (/ (exp (* 1/6 (- (log -1) (log (/ -1 x))))) (pow x 2)))) |
10 alts after pruning (8 fresh and 2 done)
Merged error: 0.0b
0% (0.1b remaining)
Error of 0.2b against oracle of 0.0b and baseline of 0.2b