



Bits error versus x
| Original | 19.5 |
|---|---|
| Target | 0.7 |
| Herbie | 0.3 |
Initial program 19.5
Initial simplification19.5
rmApplied frac-sub19.5
Simplified19.5
rmApplied flip--19.4
Applied associate-/l/19.4
Simplified0.8
rmApplied associate-/r*0.4
rmApplied *-un-lft-identity0.4
Applied *-un-lft-identity0.4
Applied distribute-lft-out0.4
Applied *-un-lft-identity0.4
Applied times-frac0.4
Simplified0.4
Simplified0.3
Final simplification0.3
herbie shell --seed 2018360 +o rules:numerics
(FPCore (x)
:name "2isqrt (example 3.6)"
:herbie-target
(/ 1 (+ (* (+ x 1) (sqrt x)) (* x (sqrt (+ x 1)))))
(- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))))
Time bar (total: 18.3s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 18.7b
Found 4 expressions with local error:
| 2.7b | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
| 0.3b | (/ 1 (sqrt x)) |
| 0.1b | (/ 1 (sqrt (+ x 1))) |
| 0.0b | (sqrt (+ x 1)) |
4 calls. Slowest were:
| 7.0ms | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
| 2.0ms | (/ 1 (sqrt (+ x 1))) |
| 1.0ms | (/ 1 (sqrt x)) |
4 calls. Slowest were:
| 42.0ms | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
| 18.0ms | (sqrt (+ x 1)) |
| 13.0ms | (/ 1 (sqrt x)) |
| 12.0ms | (/ 1 (sqrt (+ x 1))) |
92 calls. Slowest were:
| 163.0ms | (fma 1 (/ 1 (sqrt x)) (- (* (sqrt (- x 1)) (/ 1 (sqrt (- (* x x) (* 1 1))))))) |
| 148.0ms | (fma (* (cbrt (/ 1 (sqrt x))) (cbrt (/ 1 (sqrt x)))) (cbrt (/ 1 (sqrt x))) (- (* (sqrt (- x 1)) (/ 1 (sqrt (- (* x x) (* 1 1))))))) |
| 129.0ms | (fma (- (sqrt (- x 1))) (/ 1 (sqrt (- (* x x) (* 1 1)))) (* (sqrt (- x 1)) (/ 1 (sqrt (- (* x x) (* 1 1)))))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 18.2b
Found 4 expressions with local error:
| 2.7b | (- (sqrt (+ x 1)) (sqrt x)) |
| 0.2b | (* (sqrt x) (sqrt (+ x 1))) |
| 0.1b | (/ (- (sqrt (+ x 1)) (sqrt x)) (* (sqrt x) (sqrt (+ x 1)))) |
| 0.0b | (sqrt (+ x 1)) |
4 calls. Slowest were:
| 18.0ms | (/ (- (sqrt (+ x 1)) (sqrt x)) (* (sqrt x) (sqrt (+ x 1)))) |
| 6.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 4.0ms | (* (sqrt x) (sqrt (+ x 1))) |
4 calls. Slowest were:
| 74.0ms | (/ (- (sqrt (+ x 1)) (sqrt x)) (* (sqrt x) (sqrt (+ x 1)))) |
| 33.0ms | (* (sqrt x) (sqrt (+ x 1))) |
| 29.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 10.0ms | (sqrt (+ x 1)) |
106 calls. Slowest were:
| 778.0ms | (* (* (* (sqrt x) (sqrt x)) (sqrt x)) (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1)))) |
| 80.0ms | (/ (* (* (- (sqrt (+ x 1)) (sqrt x)) (- (sqrt (+ x 1)) (sqrt x))) (- (sqrt (+ x 1)) (sqrt x))) (* (* (* (sqrt x) (sqrt (+ x 1))) (* (sqrt x) (sqrt (+ x 1)))) (* (sqrt x) (sqrt (+ x 1))))) |
| 76.0ms | (/ (* (* (- (sqrt (+ x 1)) (sqrt x)) (- (sqrt (+ x 1)) (sqrt x))) (- (sqrt (+ x 1)) (sqrt x))) (* (* (* (sqrt x) (sqrt x)) (sqrt x)) (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1))))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.7b
Found 4 expressions with local error:
| 0.8b | (/ 1 (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x)))) |
| 0.2b | (* (sqrt x) (sqrt (+ x 1))) |
| 0.1b | (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 0.0b | (+ (sqrt (+ x 1)) (sqrt x)) |
4 calls. Slowest were:
| 32.0ms | (/ 1 (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x)))) |
| 17.0ms | (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 7.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
4 calls. Slowest were:
| 91.0ms | (/ 1 (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x)))) |
| 85.0ms | (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 32.0ms | (* (sqrt x) (sqrt (+ x 1))) |
| 21.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
71 calls. Slowest were:
| 530.0ms | (* (sqrt (+ (* x x) (- (* 1 1) (* x 1)))) (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x))))) |
| 500.0ms | (* (sqrt (- x 1)) (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x))))) |
| 483.0ms | (* (* (sqrt x) (sqrt (- (* x x) (* 1 1)))) (+ (pow (sqrt (+ x 1)) 3) (pow (sqrt x) 3))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (* (sqrt x) (sqrt (+ x 1))) |
| 0.1b | (/ 1 (* (sqrt x) (sqrt (+ x 1)))) |
| 0.1b | (/ (/ 1 (* (sqrt x) (sqrt (+ x 1)))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 0.0b | (+ (sqrt (+ x 1)) (sqrt x)) |
4 calls. Slowest were:
| 22.0ms | (/ (/ 1 (* (sqrt x) (sqrt (+ x 1)))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 8.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
| 7.0ms | (* (sqrt x) (sqrt (+ x 1))) |
4 calls. Slowest were:
| 121.0ms | (/ (/ 1 (* (sqrt x) (sqrt (+ x 1)))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 38.0ms | (/ 1 (* (sqrt x) (sqrt (+ x 1)))) |
| 37.0ms | (* (sqrt x) (sqrt (+ x 1))) |
| 32.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
102 calls. Slowest were:
| 349.0ms | (* (* (* (sqrt x) (sqrt x)) (sqrt x)) (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1)))) |
| 141.0ms | (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x)))) |
| 106.0ms | (- (log (/ 1 (* (sqrt x) (sqrt (+ x 1))))) (log (+ (sqrt (+ x 1)) (sqrt x)))) |
7 alts after pruning (7 fresh and 0 done)
Merged error: 0.0b
0% (0.2b remaining)
Error of 0.3b against oracle of 0.0b and baseline of 0.3b