



Bits error versus x
Results
| Original | 29.7 |
|---|---|
| Target | 0.2 |
| Herbie | 29.6 |
Initial program 29.7
rmApplied add-cube-cbrt29.7
Applied sqrt-prod29.7
Simplified29.7
rmApplied add-sqr-sqrt29.7
Applied cbrt-prod29.7
rmApplied add-exp-log29.6
rmApplied add-cube-cbrt29.6
Applied cbrt-prod29.6
Final simplification29.6
herbie shell --seed 2019008 +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: 13.8s)Debug log
1 calls. Slowest were:
| 4.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 27.8b
Found 2 expressions with local error:
| 2.1b | (- (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:
| 22.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 18.0ms | (sqrt (+ x 1)) |
59 calls. Slowest were:
| 74.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 42.0ms | (fma (sqrt (sqrt (+ x 1))) (sqrt (sqrt (+ x 1))) (- (* (sqrt (sqrt x)) (sqrt (sqrt x))))) |
| 34.0ms | (fma (sqrt (sqrt (+ x 1))) (sqrt (sqrt (+ x 1))) (- (* (sqrt (sqrt x)) (sqrt (sqrt x))))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 27.2b
Found 4 expressions with local error:
| 12.8b | (- (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 0.3b | (cbrt (+ x 1)) |
| 0.3b | (cbrt (+ 1 x)) |
| 0.2b | (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) |
4 calls. Slowest were:
| 16.0ms | (- (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 11.0ms | (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) |
| 1.0ms | (cbrt (+ x 1)) |
4 calls. Slowest were:
| 69.0ms | (- (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 59.0ms | (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) |
| 47.0ms | (cbrt (+ x 1)) |
| 32.0ms | (cbrt (+ 1 x)) |
46 calls. Slowest were:
| 406.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)))) |
| 331.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)))) |
| 223.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)))) |
19 alts after pruning (19 fresh and 0 done)
Merged error: 27.2b
Found 4 expressions with local error:
| 9.8b | (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x)) |
| 0.3b | (cbrt (+ 1 x)) |
| 0.3b | (cbrt (sqrt (+ x 1))) |
| 0.3b | (cbrt (sqrt (+ x 1))) |
4 calls. Slowest were:
| 27.0ms | (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x)) |
| 1.0ms | (cbrt (sqrt (+ x 1))) |
| 1.0ms | (cbrt (sqrt (+ x 1))) |
4 calls. Slowest were:
| 65.0ms | (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x)) |
| 48.0ms | (cbrt (sqrt (+ x 1))) |
| 44.0ms | (cbrt (sqrt (+ x 1))) |
| 32.0ms | (cbrt (+ 1 x)) |
41 calls. Slowest were:
| 269.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)))) |
| 230.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)))) |
| 200.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)))) |
19 alts after pruning (19 fresh and 0 done)
Merged error: 27.2b
Found 4 expressions with local error:
| 9.8b | (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x)) |
| 6.9b | (log (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x))) |
| 0.4b | (exp (log (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x)))) |
| 0.3b | (cbrt (+ 1 x)) |
4 calls. Slowest were:
| 34.0ms | (exp (log (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x)))) |
| 29.0ms | (log (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x))) |
| 22.0ms | (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x)) |
4 calls. Slowest were:
| 102.0ms | (log (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x))) |
| 84.0ms | (exp (log (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x)))) |
| 59.0ms | (- (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (sqrt x)) |
| 56.0ms | (cbrt (+ 1 x)) |
41 calls. Slowest were:
| 233.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)))) |
| 134.0ms | (log (- (pow (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) 3) (pow (sqrt x) 3))) |
| 119.0ms | (exp (log (- (pow (* (fabs (cbrt (+ 1 x))) (sqrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) 3) (pow (sqrt x) 3)))) |
24 alts after pruning (24 fresh and 0 done)
Merged error: 27.2b
0% (0.7b remaining)
Error of 29.6b against oracle of 28.9b and baseline of 29.6b