



Bits error versus x
Results
| Original | 29.7 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 29.7
Initial simplification29.7
rmApplied flip--29.6
Taylor expanded around inf 0.2
rmApplied add-sqr-sqrt0.2
Applied sqrt-prod0.3
rmApplied *-un-lft-identity0.3
Applied associate-/r*0.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2018360 +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: 10.3s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 28.2b
Found 2 expressions with local error:
| 2.7b | (- (sqrt (+ 1 x)) (sqrt x)) |
| 0.0b | (sqrt (+ 1 x)) |
2 calls. Slowest were:
| 6.0ms | (- (sqrt (+ 1 x)) (sqrt x)) |
| 1.0ms | (sqrt (+ 1 x)) |
2 calls. Slowest were:
| 22.0ms | (- (sqrt (+ 1 x)) (sqrt x)) |
| 11.0ms | (sqrt (+ 1 x)) |
59 calls. Slowest were:
| 75.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 37.0ms | (fma (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x))) (- (* (sqrt (sqrt x)) (sqrt (sqrt x))))) |
| 30.0ms | (fma (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x))) (- (* (sqrt (sqrt x)) (sqrt (sqrt x))))) |
13 alts after pruning (13 fresh and 0 done)
Merged error: 27.1b
Found 4 expressions with local error:
| 1.7b | (- (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (* (sqrt x) (sqrt x))) |
| 0.5b | (* (sqrt x) (sqrt x)) |
| 0.2b | (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) |
| 0.1b | (/ (- (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ 1 x)) (sqrt x))) |
4 calls. Slowest were:
| 24.0ms | (/ (- (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ 1 x)) (sqrt x))) |
| 14.0ms | (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) |
| 10.0ms | (- (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (* (sqrt x) (sqrt x))) |
4 calls. Slowest were:
| 57.0ms | (/ (- (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ 1 x)) (sqrt x))) |
| 16.0ms | (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) |
| 10.0ms | (* (sqrt x) (sqrt x)) |
| 7.0ms | (- (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (* (sqrt x) (sqrt x))) |
111 calls. Slowest were:
| 527.0ms | (- (pow (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) 3) (pow (* (sqrt x) (sqrt x)) 3)) |
| 489.0ms | (- (* (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (* (sqrt (+ 1 x)) (sqrt (+ 1 x)))) (* (* (sqrt x) (sqrt x)) (* (sqrt x) (sqrt x)))) |
| 316.0ms | (* (* (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (sqrt (+ 1 x))) (* (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (sqrt (+ 1 x)))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 0.2b | (/ 1 (+ (sqrt (+ 1 x)) (sqrt x))) |
| 0.0b | (+ (sqrt (+ 1 x)) (sqrt x)) |
| 0.0b | (sqrt (+ 1 x)) |
3 calls. Slowest were:
| 5.0ms | (+ (sqrt (+ 1 x)) (sqrt x)) |
| 4.0ms | (/ 1 (+ (sqrt (+ 1 x)) (sqrt x))) |
| 1.0ms | (sqrt (+ 1 x)) |
3 calls. Slowest were:
| 47.0ms | (/ 1 (+ (sqrt (+ 1 x)) (sqrt x))) |
| 33.0ms | (+ (sqrt (+ 1 x)) (sqrt x)) |
| 20.0ms | (sqrt (+ 1 x)) |
29 calls. Slowest were:
| 155.0ms | (+ (* (sqrt (+ 1 x)) (sqrt (+ 1 x))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ 1 x)) (sqrt x)))) |
| 73.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 9.0ms | (- (sqrt (+ 1 x)) (sqrt x)) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (* (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x)))) |
| 0.2b | (/ 1 (+ (* (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x)))) (sqrt x))) |
| 0.1b | (sqrt (sqrt (+ 1 x))) |
| 0.1b | (sqrt (sqrt (+ 1 x))) |
4 calls. Slowest were:
| 17.0ms | (/ 1 (+ (* (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x)))) (sqrt x))) |
| 10.0ms | (* (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x)))) |
| 2.0ms | (sqrt (sqrt (+ 1 x))) |
4 calls. Slowest were:
| 49.0ms | (sqrt (sqrt (+ 1 x))) |
| 45.0ms | (/ 1 (+ (* (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x)))) (sqrt x))) |
| 37.0ms | (sqrt (sqrt (+ 1 x))) |
| 19.0ms | (* (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x)))) |
78 calls. Slowest were:
| 284.0ms | (- (+ (* 1/4 (/ (exp (* 1/4 (- (log -1) (log (/ -1 x))))) x)) (exp (* 1/4 (- (log -1) (log (/ -1 x)))))) (* 3/32 (/ (exp (* 1/4 (- (log -1) (log (/ -1 x))))) (pow x 2)))) |
| 238.0ms | (- (+ (* 1/4 (/ (exp (* 1/4 (- (log -1) (log (/ -1 x))))) x)) (exp (* 1/4 (- (log -1) (log (/ -1 x)))))) (* 3/32 (/ (exp (* 1/4 (- (log -1) (log (/ -1 x))))) (pow x 2)))) |
| 191.0ms | (+ (* (* (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x)))) (* (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x))))) (- (* (sqrt x) (sqrt x)) (* (* (sqrt (sqrt (+ 1 x))) (sqrt (sqrt (+ 1 x)))) (sqrt x)))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 0.0b
0% (0.1b remaining)
Error of 0.2b against oracle of 0.0b and baseline of 0.2b