



Bits error versus x
Results
| Original | 30.0 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 30.0
rmApplied flip--29.7
Taylor expanded around inf 0.2
Final simplification0.2
herbie shell --seed 2019022 +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: 9.8s)Debug log
| 13.0ms | 270× | body | 80 | nan |
| 12.0ms | 50× | body | 1280 | valid |
| 8.0ms | 43× | body | 640 | valid |
| 7.0ms | 126× | body | 80 | valid |
| 4.0ms | 22× | body | 320 | valid |
| 2.0ms | 15× | body | 160 | valid |
| 4.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 30.5b
Found 1 expressions with local error:
| 4.0b | (- (sqrt (+ x 1)) (sqrt x)) |
| 19× | add-sqr-sqrt |
| 18× | prod-diff |
| 17× | *-un-lft-identity |
| 15× | add-cube-cbrt |
| 13× | sqrt-prod |
| 6× | fma-neg |
| 3× | add-log-exp |
| 2× | difference-of-squares |
| 1× | distribute-lft-out-- |
| 1× | flip-- |
| 1× | log1p-expm1-u |
| 1× | add-exp-log |
| 1× | diff-log |
| 1× | add-cbrt-cube |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | pow1 |
| 1× | expm1-log1p-u |
| 6.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 40.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 42.0ms | (fma (sqrt (sqrt (+ x 1))) (sqrt (sqrt (+ x 1))) (- (* (sqrt (sqrt x)) (sqrt (sqrt x))))) |
| 29.0ms | (fma (- (cbrt (sqrt x))) (* (cbrt (sqrt x)) (cbrt (sqrt x))) (* (cbrt (sqrt x)) (* (cbrt (sqrt x)) (cbrt (sqrt x))))) |
| 29.0ms | (fma (- (cbrt (sqrt x))) (* (cbrt (sqrt x)) (cbrt (sqrt x))) (* (cbrt (sqrt x)) (* (cbrt (sqrt x)) (cbrt (sqrt x))))) |
| 29.0ms | (fma (- (cbrt (sqrt x))) (* (cbrt (sqrt x)) (cbrt (sqrt x))) (* (cbrt (sqrt x)) (* (cbrt (sqrt x)) (cbrt (sqrt x))))) |
| 27.0ms | (fma (sqrt (* (cbrt (+ x 1)) (cbrt (+ x 1)))) (sqrt (cbrt (+ x 1))) (- (* (sqrt x) 1))) |
7 alts after pruning (7 fresh and 0 done)
Merged error: 29.5b
Found 4 expressions with local error:
| 2.9b | (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) |
| 0.5b | (* (sqrt x) (sqrt x)) |
| 0.2b | (* (sqrt (+ x 1)) (sqrt (+ x 1))) |
| 0.0b | (/ (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 30× | *-un-lft-identity |
| 20× | add-cube-cbrt |
| 20× | add-sqr-sqrt |
| 16× | times-frac |
| 14× | pow1 |
| 12× | sqrt-div |
| 10× | add-exp-log |
| 10× | add-cbrt-cube |
| 9× | associate-*l* |
| 9× | associate-*r* |
| 8× | pow1/2 |
| 7× | flip-+ |
| 7× | flip3-+ |
| 6× | difference-of-squares |
| 6× | add-log-exp |
| 6× | sqrt-prod |
| 5× | distribute-lft-out |
| 4× | associate-/l* |
| 4× | log1p-expm1-u |
| 4× | pow-prod-up |
| 4× | pow-prod-down |
| 4× | associate-/r* |
| 4× | frac-times |
| 4× | expm1-log1p-u |
| 2× | associate-/l/ |
| 2× | flip-- |
| 2× | cbrt-unprod |
| 2× | *-commutative |
| 2× | associate-/r/ |
| 2× | associate-*r/ |
| 2× | prod-exp |
| 2× | associate-*l/ |
| 2× | sqrt-unprod |
| 2× | flip3-- |
| 2× | pow-plus |
| 2× | rem-square-sqrt |
| 2× | pow2 |
| 1× | div-inv |
| 1× | prod-diff |
| 1× | div-exp |
| 1× | div-sub |
| 1× | diff-log |
| 1× | fma-neg |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 28.0ms | (/ (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 10.0ms | (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) |
| 5.0ms | (* (sqrt (+ x 1)) (sqrt (+ x 1))) |
| 3.0ms | (* (sqrt x) (sqrt x)) |
| 52.0ms | (/ (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 11.0ms | (* (sqrt x) (sqrt x)) |
| 10.0ms | (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) |
| 9.0ms | (* (sqrt (+ x 1)) (sqrt (+ x 1))) |
| 648.0ms | (- (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt (+ x 1)) (sqrt (+ x 1)))) (* (* (sqrt x) (sqrt x)) (* (sqrt x) (sqrt x)))) |
| 226.0ms | (* (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1))) (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1)))) |
| 186.0ms | (/ (* (* (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x))) (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x)))) (- (* (sqrt (+ x 1)) (sqrt (+ x 1))) (* (sqrt x) (sqrt x)))) (* (* (+ (sqrt (+ x 1)) (sqrt x)) (+ (sqrt (+ x 1)) (sqrt x))) (+ (sqrt (+ x 1)) (sqrt x)))) |
| 140.0ms | (- (pow (* (sqrt (+ x 1)) (sqrt (+ x 1))) 3) (pow (* (sqrt x) (sqrt x)) 3)) |
| 100.0ms | (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x)))) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 0.1b | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 0.0b | (+ (sqrt (+ x 1)) (sqrt x)) |
| 9× | *-un-lft-identity |
| 6× | fma-def |
| 5× | add-cube-cbrt |
| 5× | add-sqr-sqrt |
| 4× | add-log-exp |
| 4× | associate-/r* |
| 3× | sqrt-prod |
| 3× | add-exp-log |
| 3× | pow1 |
| 2× | distribute-lft-out |
| 2× | log1p-expm1-u |
| 2× | flip-+ |
| 2× | associate-/r/ |
| 2× | add-cbrt-cube |
| 2× | flip3-+ |
| 2× | expm1-log1p-u |
| 1× | inv-pow |
| 1× | pow-flip |
| 1× | div-inv |
| 1× | frac-2neg |
| 1× | sum-log |
| 1× | clear-num |
| 1× | rec-exp |
| 1× | +-commutative |
| 9.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
| 8.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 44.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 33.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
| 92.0ms | (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x)))) |
| 5.0ms | (* (exp (sqrt (+ x 1))) (exp (sqrt x))) |
| 4.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 3.0ms | (sqrt (+ (sqrt (+ x 1)) (sqrt x))) |
| 3.0ms | (+ (sqrt (+ x 1)) (sqrt x)) |
8 alts after pruning (7 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (* (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))) (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x))))) |
| 0.1b | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 0.1b | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 0.1b | (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))) |
| 18× | sqrt-prod |
| 15× | *-un-lft-identity |
| 12× | add-sqr-sqrt |
| 11× | add-cube-cbrt |
| 11× | pow1 |
| 10× | associate-/r/ |
| 9× | associate-*l* |
| 9× | associate-*r* |
| 8× | add-exp-log |
| 8× | associate-/r* |
| 6× | add-cbrt-cube |
| 5× | div-inv |
| 5× | flip-+ |
| 5× | sqrt-div |
| 5× | pow1/2 |
| 5× | flip3-+ |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 2× | inv-pow |
| 2× | distribute-lft-out |
| 2× | pow-flip |
| 2× | pow-prod-up |
| 2× | pow-prod-down |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | rec-exp |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | associate-*r/ |
| 1× | prod-exp |
| 1× | associate-*l/ |
| 1× | sqrt-unprod |
| 1× | pow-plus |
| 1× | rem-square-sqrt |
| 1× | rem-sqrt-square |
| 1× | frac-times |
| 1× | pow2 |
| 10.0ms | (* (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))) (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x))))) |
| 7.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 6.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 3.0ms | (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))) |
| 45.0ms | (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))) |
| 30.0ms | (* (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))) (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x))))) |
| 29.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 26.0ms | (/ 1 (+ (sqrt (+ x 1)) (sqrt x))) |
| 101.0ms | (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x)))) |
| 91.0ms | (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x)))) |
| 74.0ms | (sqrt (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x))))) |
| 66.0ms | (* (* (* (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))) (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x))))) (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x))))) (* (* (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))) (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x))))) (sqrt (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))))) |
| 48.0ms | (sqrt (/ 1 (+ (pow (sqrt (+ x 1)) 3) (pow (sqrt x) 3)))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.0b
0% (0.1b remaining)
Error of 0.2b against oracle of 0.1b and baseline of 0.2b
| 581.0ms | 8004× | body | 80 | nan |
| 492.0ms | 1717× | body | 1280 | valid |
| 354.0ms | 1216× | body | 640 | valid |
| 219.0ms | 4066× | body | 80 | valid |
| 103.0ms | 658× | body | 320 | valid |
| 65.0ms | 343× | body | 160 | valid |