



Bits error versus x
| Original | 30.1 |
|---|---|
| Target | 0.2 |
| Herbie | 30.0 |
Initial program 30.1
rmApplied add-sqr-sqrt30.2
Applied add-cube-cbrt30.1
Applied sqrt-prod30.1
Applied prod-diff30.1
Simplified30.1
Simplified30.1
rmApplied add-exp-log30.0
rmApplied add-cube-cbrt30.0
rmApplied add-cube-cbrt30.0
Final simplification30.0
herbie shell --seed 2019010 +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.6s)Debug log
| 8.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 25.9b
Found 2 expressions with local error:
| 3.3b | (- (sqrt (+ x 1)) (sqrt x)) |
| 0.0b | (sqrt (+ x 1)) |
| 22× | add-sqr-sqrt |
| 19× | *-un-lft-identity |
| 18× | prod-diff |
| 17× | add-cube-cbrt |
| 16× | sqrt-prod |
| 6× | fma-neg |
| 4× | add-log-exp |
| 2× | difference-of-squares |
| 2× | log1p-expm1-u |
| 2× | add-exp-log |
| 2× | sqrt-div |
| 2× | add-cbrt-cube |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 1× | distribute-lft-out-- |
| 1× | flip-- |
| 1× | flip-+ |
| 1× | diff-log |
| 1× | pow1/2 |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | rem-sqrt-square |
| 11.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 1.0ms | (sqrt (+ x 1)) |
| 53.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 19.0ms | (sqrt (+ x 1)) |
| 72.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 41.0ms | (fma (sqrt (sqrt (+ x 1))) (sqrt (sqrt (+ x 1))) (- (* (sqrt (sqrt x)) (sqrt (sqrt x))))) |
| 38.0ms | (fma (sqrt (sqrt (+ x 1))) (sqrt (sqrt (+ x 1))) (- (* (sqrt (sqrt x)) (sqrt (sqrt x))))) |
| 30.0ms | (fma (- (cbrt (sqrt x))) (* (cbrt (sqrt x)) (cbrt (sqrt x))) (* (cbrt (sqrt x)) (* (cbrt (sqrt x)) (cbrt (sqrt x))))) |
| 30.0ms | (fma (- (cbrt (sqrt x))) (* (cbrt (sqrt x)) (cbrt (sqrt x))) (* (cbrt (sqrt x)) (* (cbrt (sqrt x)) (cbrt (sqrt x))))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 25.3b
Found 4 expressions with local error:
| 25.9b | (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))) |
| 0.2b | (cbrt (+ 1 x)) |
| 0.2b | (cbrt (+ 1 x)) |
| 0.1b | (sqrt (cbrt (+ 1 x))) |
| 10× | add-sqr-sqrt |
| 10× | cbrt-prod |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 6× | sqrt-prod |
| 6× | cbrt-div |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | flip-+ |
| 3× | flip3-+ |
| 2× | sqrt-div |
| 2× | pow1/3 |
| 2× | rem-sqrt-square |
| 1× | fma-udef |
| 1× | pow1/2 |
| 2.0ms | (sqrt (cbrt (+ 1 x))) |
| 1.0ms | (cbrt (+ 1 x)) |
| 1.0ms | (cbrt (+ 1 x)) |
| 0.0ms | (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))) |
| 57.0ms | (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))) |
| 46.0ms | (cbrt (+ 1 x)) |
| 42.0ms | (sqrt (cbrt (+ 1 x))) |
| 40.0ms | (cbrt (+ 1 x)) |
| 255.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)))) |
| 226.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)))) |
| 173.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)))) |
| 103.0ms | (- (+ (* 1/6 x) 1) (* 5/72 (pow x 2))) |
| 103.0ms | (- (+ (* 1/3 x) 1) (* 1/9 (pow x 2))) |
22 alts after pruning (22 fresh and 0 done)
Merged error: 25.3b
Found 4 expressions with local error:
| 25.9b | (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))) |
| 6.7b | (log (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x)))) |
| 0.5b | (exp (log (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))))) |
| 0.2b | (cbrt (+ 1 x)) |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | log-prod |
| 6× | pow1 |
| 5× | add-exp-log |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-cbrt-cube |
| 4× | exp-prod |
| 4× | expm1-log1p-u |
| 3× | exp-sum |
| 3× | cbrt-prod |
| 2× | log-pow |
| 2× | cbrt-div |
| 1× | rem-exp-log |
| 1× | fma-udef |
| 1× | flip-+ |
| 1× | rem-log-exp |
| 1× | pow1/3 |
| 1× | flip3-+ |
| 2.0ms | (exp (log (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))))) |
| 1.0ms | (log (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x)))) |
| 1.0ms | (cbrt (+ 1 x)) |
| 0.0ms | (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))) |
| 93.0ms | (log (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x)))) |
| 88.0ms | (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))) |
| 64.0ms | (exp (log (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))))) |
| 41.0ms | (cbrt (+ 1 x)) |
| 263.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)))) |
| 95.0ms | (- (+ (* 1/3 x) 1) (* 1/9 (pow x 2))) |
| 65.0ms | (- (+ (* 1/3 (pow (/ 1 (pow x 2)) 1/3)) (pow (/ 1 x) -1/3)) (* 1/9 (pow (/ 1 (pow x 5)) 1/3))) |
| 22.0ms | (exp (* (cbrt (log (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))))) (cbrt (log (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))))))) |
| 18.0ms | (log (sqrt (fma (fabs (cbrt (+ 1 x))) (sqrt (cbrt (+ 1 x))) (- (sqrt x))))) |
26 alts after pruning (26 fresh and 0 done)
Merged error: 25.3b
Found 4 expressions with local error:
| 25.9b | (fma (fabs (cbrt (+ 1 x))) (sqrt (* (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (+ 1 x))))) (- (sqrt x))) |
| 6.7b | (log (fma (fabs (cbrt (+ 1 x))) (sqrt (* (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (+ 1 x))))) (- (sqrt x)))) |
| 0.4b | (exp (log (fma (fabs (cbrt (+ 1 x))) (sqrt (* (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (+ 1 x))))) (- (sqrt x))))) |
| 0.2b | (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) |
| 24× | cbrt-div |
| 18× | cbrt-prod |
| 13× | add-cube-cbrt |
| 13× | *-un-lft-identity |
| 13× | add-sqr-sqrt |
| 11× | pow1 |
| 9× | associate-*l* |
| 9× | associate-*r* |
| 7× | add-exp-log |
| 6× | flip-+ |
| 6× | flip3-+ |
| 6× | log-prod |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | pow1/3 |
| 4× | add-cbrt-cube |
| 4× | exp-prod |
| 4× | frac-times |
| 4× | expm1-log1p-u |
| 3× | exp-sum |
| 2× | pow-prod-up |
| 2× | log-pow |
| 2× | associate-*r/ |
| 2× | associate-*l/ |
| 2× | pow-prod-down |
| 1× | rem-exp-log |
| 1× | fma-udef |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | rem-log-exp |
| 1× | pow-plus |
| 1× | pow2 |
| 19.0ms | (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) |
| 4.0ms | (exp (log (fma (fabs (cbrt (+ 1 x))) (sqrt (* (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (+ 1 x))))) (- (sqrt x))))) |
| 2.0ms | (log (fma (fabs (cbrt (+ 1 x))) (sqrt (* (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (+ 1 x))))) (- (sqrt x)))) |
| 0.0ms | (fma (fabs (cbrt (+ 1 x))) (sqrt (* (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (+ 1 x))))) (- (sqrt x))) |
| 97.0ms | (log (fma (fabs (cbrt (+ 1 x))) (sqrt (* (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (+ 1 x))))) (- (sqrt x)))) |
| 68.0ms | (fma (fabs (cbrt (+ 1 x))) (sqrt (* (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (+ 1 x))))) (- (sqrt x))) |
| 63.0ms | (exp (log (fma (fabs (cbrt (+ 1 x))) (sqrt (* (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (+ 1 x))))) (- (sqrt x))))) |
| 36.0ms | (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) |
| 101.0ms | (- (+ (* 2/9 x) 1) (* 7/81 (pow x 2))) |
| 80.0ms | (* (cbrt (cbrt (+ (* 1 1) (- (* x x) (* 1 x))))) (cbrt (cbrt (+ (* 1 1) (- (* x x) (* 1 x)))))) |
| 74.0ms | (* (cbrt (cbrt (+ (* 1 1) (- (* x x) (* 1 x))))) (cbrt (cbrt (- 1 x)))) |
| 71.0ms | (* (cbrt (cbrt (- 1 x))) (cbrt (cbrt (+ (* 1 1) (- (* x x) (* 1 x)))))) |
| 64.0ms | (cbrt (cbrt (+ (* 1 1) (- (* x x) (* 1 x))))) |
29 alts after pruning (29 fresh and 0 done)
Merged error: 25.3b
0% (0.7b remaining)
Error of 30.0b against oracle of 29.2b and baseline of 30.0b