



Bits error versus x
Results
| Original | 29.0 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 29.0
rmApplied flip--28.9
Taylor expanded around inf 0.2
Final simplification0.2
herbie shell --seed 2018365 +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.5s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 28.8b
Found 2 expressions with local error:
| 2.9b | (- (sqrt (+ x 1)) (sqrt x)) |
| 0.0b | (sqrt (+ x 1)) |
2 calls. Slowest were:
| 6.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 1.0ms | (sqrt (+ x 1)) |
2 calls. Slowest were:
| 26.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 18.0ms | (sqrt (+ x 1)) |
59 calls. Slowest were:
| 69.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 38.0ms | (fma (sqrt 1) (sqrt (+ x 1)) (- (* (sqrt x) 1))) |
| 36.0ms | (fma (- (cbrt (sqrt x))) (* (cbrt (sqrt x)) (cbrt (sqrt x))) (* (cbrt (sqrt x)) (* (cbrt (sqrt x)) (cbrt (sqrt x))))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 28.0b
Found 4 expressions with local error:
| 2.4b | (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) |
| 0.5b | (* (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:
| 37.0ms | (/ (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 17.0ms | (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) |
| 9.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))) |
| 13.0ms | (* (sqrt (+ x 1)) (sqrt (+ x 1))) |
| 11.0ms | (* (sqrt x) (sqrt x)) |
| 10.0ms | (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) |
111 calls. Slowest were:
| 812.0ms | (- (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt (+ x 1)) (sqrt (+ x 1)))) (* (* (sqrt x) (sqrt x)) (* (sqrt x) (sqrt x)))) |
| 257.0ms | (* (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1))) (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1)))) |
| 181.0ms | (- (pow (* (sqrt (+ x 1)) (sqrt (+ x 1))) 3) (pow (* (sqrt x) (sqrt x)) 3)) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 0.2b | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 0.0b | (+ (sqrt (+ x 1)) (sqrt x)) |
| 0.0b | (sqrt (+ x 1)) |
3 calls. Slowest were:
| 5.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
| 4.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 1.0ms | (sqrt (+ x 1)) |
3 calls. Slowest were:
| 33.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
| 29.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 12.0ms | (sqrt (+ x 1)) |
29 calls. Slowest were:
| 106.0ms | (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x)))) |
| 69.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 35.0ms | (sqrt (- (* x x) (* 1 1))) |
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 | (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) |
| 0.2b | (/ 1 (+ (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) (sqrt x))) |
4 calls. Slowest were:
| 13.0ms | (/ 1 (+ (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) (sqrt x))) |
| 10.0ms | (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) |
| 1.0ms | (cbrt (+ x 1)) |
4 calls. Slowest were:
| 106.0ms | (/ 1 (+ (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) (sqrt x))) |
| 63.0ms | (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) |
| 58.0ms | (cbrt (+ x 1)) |
| 53.0ms | (cbrt (+ 1 x)) |
44 calls. Slowest were:
| 470.0ms | (- (+ (fabs (pow (+ x 1) 1/3)) (* 1/6 (* (fabs (pow (+ x 1) 1/3)) x))) (* 5/72 (* (fabs (pow (+ x 1) 1/3)) (pow x 2)))) |
| 288.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)))) |
| 231.0ms | (- (+ (* 1/6 (* (fabs (pow (+ x 1) 1/3)) (pow (/ 1 (pow x 5)) 1/6))) (* (fabs (pow (+ x 1) 1/3)) (pow x 1/6))) (* 5/72 (* (fabs (pow (+ x 1) 1/3)) (pow (/ 1 (pow x 11)) 1/6)))) |
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