



Bits error versus x
Results
| Original | 29.8 |
|---|---|
| Target | 0.2 |
| Herbie | 29.7 |
Initial program 29.8
rmApplied add-cube-cbrt29.8
Applied sqrt-prod29.8
Simplified29.8
rmApplied add-cbrt-cube29.8
rmApplied expm1-log1p-u29.7
rmApplied flip--29.7
Final simplification29.7
herbie shell --seed 2019007 +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.0s)Debug log
1 calls. Slowest were:
| 7.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 33.6b
Found 2 expressions with local error:
| 3.3b | (- (sqrt (+ x 1)) (sqrt x)) |
| 0.0b | (sqrt (+ x 1)) |
2 calls. Slowest were:
| 13.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 1.0ms | (sqrt (+ x 1)) |
2 calls. Slowest were:
| 59.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 18.0ms | (sqrt (+ x 1)) |
59 calls. Slowest were:
| 102.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 43.0ms | (fma (sqrt (sqrt (+ x 1))) (sqrt (sqrt (+ x 1))) (- (* (sqrt (sqrt x)) (sqrt (sqrt x))))) |
| 35.0ms | (sqrt (- (* x x) (* 1 1))) |
13 alts after pruning (13 fresh and 0 done)
Merged error: 32.9b
Found 4 expressions with local error:
| 14.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:
| 15.0ms | (- (* (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:
| 67.0ms | (- (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 48.0ms | (cbrt (+ x 1)) |
| 37.0ms | (* (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ x 1)))) |
| 31.0ms | (cbrt (+ 1 x)) |
46 calls. Slowest were:
| 440.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)))) |
| 301.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)))) |
| 260.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)))) |
17 alts after pruning (17 fresh and 0 done)
Merged error: 32.9b
Found 4 expressions with local error:
| 14.8b | (- (* (fabs (cbrt (* (* (cbrt (+ 1 x)) (cbrt (+ 1 x))) (cbrt (+ 1 x))))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 0.3b | (cbrt (+ 1 x)) |
| 0.3b | (cbrt (+ 1 x)) |
| 0.3b | (cbrt (+ 1 x)) |
4 calls. Slowest were:
| 11.0ms | (- (* (fabs (cbrt (* (* (cbrt (+ 1 x)) (cbrt (+ 1 x))) (cbrt (+ 1 x))))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 1.0ms | (cbrt (+ 1 x)) |
| 1.0ms | (cbrt (+ 1 x)) |
4 calls. Slowest were:
| 83.0ms | (- (* (fabs (cbrt (* (* (cbrt (+ 1 x)) (cbrt (+ 1 x))) (cbrt (+ 1 x))))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 59.0ms | (cbrt (+ 1 x)) |
| 51.0ms | (cbrt (+ 1 x)) |
| 51.0ms | (cbrt (+ 1 x)) |
35 calls. Slowest were:
| 224.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)))) |
| 204.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)))) |
| 185.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)))) |
17 alts after pruning (17 fresh and 0 done)
Merged error: 32.9b
Found 4 expressions with local error:
| 14.8b | (- (* (fabs (cbrt (* (* (cbrt (+ 1 x)) (cbrt (+ 1 x))) (cbrt (+ 1 x))))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 0.4b | (expm1 (log1p (- (* (fabs (cbrt (* (* (cbrt (+ 1 x)) (cbrt (+ 1 x))) (cbrt (+ 1 x))))) (sqrt (cbrt (+ x 1)))) (sqrt x)))) |
| 0.3b | (cbrt (+ x 1)) |
| 0.3b | (cbrt (+ 1 x)) |
4 calls. Slowest were:
| 8.0ms | (- (* (fabs (cbrt (* (* (cbrt (+ 1 x)) (cbrt (+ 1 x))) (cbrt (+ 1 x))))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 1.0ms | (cbrt (+ 1 x)) |
| 1.0ms | (cbrt (+ x 1)) |
4 calls. Slowest were:
| 169.0ms | (expm1 (log1p (- (* (fabs (cbrt (* (* (cbrt (+ 1 x)) (cbrt (+ 1 x))) (cbrt (+ 1 x))))) (sqrt (cbrt (+ x 1)))) (sqrt x)))) |
| 80.0ms | (- (* (fabs (cbrt (* (* (cbrt (+ 1 x)) (cbrt (+ 1 x))) (cbrt (+ 1 x))))) (sqrt (cbrt (+ x 1)))) (sqrt x)) |
| 32.0ms | (cbrt (+ 1 x)) |
| 31.0ms | (cbrt (+ x 1)) |
31 calls. Slowest were:
| 241.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)))) |
| 213.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)))) |
| 104.0ms | (- (+ (* 1/3 x) 1) (* 1/9 (pow x 2))) |
19 alts after pruning (19 fresh and 0 done)
Merged error: 32.9b
0% (0.7b remaining)
Error of 29.7b against oracle of 28.9b and baseline of 29.7b