



Bits error versus x
Results
| Original | 19.9 |
|---|---|
| Target | 0.7 |
| Herbie | 0.4 |
Initial program 19.9
rmApplied flip--20.0
rmApplied frac-times25.0
Applied frac-times20.1
Applied frac-sub19.8
Simplified5.9
Simplified5.7
rmApplied div-inv5.7
Applied div-inv5.7
Applied distribute-lft-out5.7
Applied *-un-lft-identity5.7
Applied times-frac5.7
Simplified5.7
Simplified0.4
Final simplification0.4
herbie shell --seed 2019010
(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: 29.4s)Debug log
| 6.0ms | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 19.2b
Found 4 expressions with local error:
| 3.3b | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
| 0.3b | (/ 1 (sqrt x)) |
| 0.1b | (/ 1 (sqrt (+ x 1))) |
| 0.0b | (sqrt (+ x 1)) |
| 12× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 9× | associate-/r* |
| 8× | add-cube-cbrt |
| 6× | add-log-exp |
| 6× | div-inv |
| 6× | sqrt-prod |
| 6× | add-exp-log |
| 6× | pow1 |
| 4× | distribute-lft-out-- |
| 4× | pow-flip |
| 4× | sqrt-div |
| 4× | add-cbrt-cube |
| 3× | pow1/2 |
| 2× | inv-pow |
| 2× | flip-+ |
| 2× | associate-/r/ |
| 2× | flip3-+ |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | rec-exp |
| 1× | difference-of-squares |
| 1× | flip-- |
| 1× | frac-sub |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | rem-sqrt-square |
| 5.0ms | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
| 1.0ms | (/ 1 (sqrt (+ x 1))) |
| 1.0ms | (/ 1 (sqrt x)) |
| 1.0ms | (sqrt (+ x 1)) |
| 39.0ms | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
| 21.0ms | (/ 1 (sqrt (+ x 1))) |
| 19.0ms | (/ 1 (sqrt x)) |
| 17.0ms | (sqrt (+ x 1)) |
| 64.0ms | (- (+ (* 3/8 (pow x 2)) 1) (* 1/2 x)) |
| 61.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 37.0ms | (/ (exp (/ 1 (sqrt x))) (exp (/ 1 (sqrt (+ x 1))))) |
| 30.0ms | (- (* 1 (sqrt (+ x 1))) (* (sqrt x) 1)) |
| 23.0ms | (sqrt (+ (* x x) (- (* 1 1) (* x 1)))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 18.6b
Found 4 expressions with local error:
| 3.3b | (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) |
| 0.5b | (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) |
| 0.3b | (/ (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
| 0.3b | (/ 1 (sqrt x)) |
| 40× | *-un-lft-identity |
| 32× | frac-sub |
| 28× | times-frac |
| 24× | div-inv |
| 20× | distribute-lft-out |
| 20× | add-cube-cbrt |
| 20× | add-sqr-sqrt |
| 18× | associate-/l/ |
| 17× | un-div-inv |
| 17× | associate-*r/ |
| 17× | associate-*l/ |
| 17× | frac-times |
| 16× | pow1 |
| 15× | add-exp-log |
| 12× | pow-flip |
| 10× | associate-/r* |
| 9× | difference-of-squares |
| 8× | add-cbrt-cube |
| 7× | inv-pow |
| 6× | add-log-exp |
| 6× | pow-prod-up |
| 5× | pow1/2 |
| 5× | rec-exp |
| 4× | associate-/l* |
| 4× | prod-exp |
| 4× | pow-prod-down |
| 4× | associate-*l* |
| 4× | associate-*r* |
| 3× | associate-/r/ |
| 2× | flip-- |
| 2× | flip3-- |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | flip-+ |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | frac-add |
| 1× | div-exp |
| 1× | div-sub |
| 1× | diff-log |
| 1× | pow-plus |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | cbrt-undiv |
| 1× | pow2 |
| 43.0ms | (/ (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
| 18.0ms | (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) |
| 9.0ms | (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) |
| 1.0ms | (/ 1 (sqrt x)) |
| 57.0ms | (/ (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
| 27.0ms | (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) |
| 11.0ms | (/ 1 (sqrt x)) |
| 11.0ms | (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) |
| 611.0ms | (/ (sqrt (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1)))))) (sqrt (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))))) |
| 408.0ms | (/ (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
| 389.0ms | (/ (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
| 388.0ms | (/ (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
| 373.0ms | (/ (- (* (/ 1 (sqrt x)) (/ 1 (sqrt x))) (* (/ 1 (sqrt (+ x 1))) (/ 1 (sqrt (+ x 1))))) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
5 alts after pruning (5 fresh and 0 done)
Merged error: 4.7b
Found 4 expressions with local error:
| 4.6b | (/ (/ 1 (+ (* x x) x)) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
| 0.3b | (/ 1 (+ (* x x) x)) |
| 0.3b | (/ 1 (sqrt x)) |
| 0.1b | (/ 1 (sqrt (+ x 1))) |
| 51× | *-un-lft-identity |
| 42× | times-frac |
| 40× | div-inv |
| 28× | distribute-lft-out |
| 23× | add-cube-cbrt |
| 23× | associate-/r/ |
| 23× | add-sqr-sqrt |
| 20× | associate-/r* |
| 11× | flip-+ |
| 11× | add-exp-log |
| 11× | flip3-+ |
| 7× | pow1 |
| 6× | associate-/l* |
| 6× | add-cbrt-cube |
| 5× | pow-flip |
| 4× | add-log-exp |
| 4× | frac-2neg |
| 4× | clear-num |
| 4× | rec-exp |
| 3× | inv-pow |
| 3× | sqrt-prod |
| 2× | div-exp |
| 2× | sqrt-div |
| 2× | pow1/2 |
| 1× | associate-/l/ |
| 1× | frac-add |
| 1× | distribute-lft1-in |
| 1× | cbrt-undiv |
| 10.0ms | (/ (/ 1 (+ (* x x) x)) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
| 2.0ms | (/ 1 (+ (* x x) x)) |
| 1.0ms | (/ 1 (sqrt (+ x 1))) |
| 1.0ms | (/ 1 (sqrt x)) |
| 54.0ms | (/ (/ 1 (+ (* x x) x)) (+ (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1))))) |
| 12.0ms | (/ 1 (sqrt (+ x 1))) |
| 11.0ms | (/ 1 (sqrt x)) |
| 9.0ms | (/ 1 (+ (* x x) x)) |
| 324.0ms | (+ (* (* x x) (* x x)) (- (* x x) (* (* x x) x))) |
| 212.0ms | (/ (/ 1 (- (* (* x x) (* x x)) (* x x))) 1) |
| 210.0ms | (/ (/ 1 (- (* (* x x) (* x x)) (* x x))) 1) |
| 209.0ms | (/ (/ 1 (- (* (* x x) (* x x)) (* x x))) 1) |
| 209.0ms | (/ (/ 1 (- (* (* x x) (* x x)) (* x x))) 1) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.5b | (/ x (sqrt x)) |
| 0.3b | (/ (/ 1 (+ x 1)) (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1))))) |
| 0.2b | (/ x (sqrt (+ x 1))) |
| 0.0b | (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1)))) |
| 36× | *-un-lft-identity |
| 30× | times-frac |
| 25× | div-inv |
| 20× | add-cube-cbrt |
| 20× | add-sqr-sqrt |
| 17× | associate-/r/ |
| 16× | distribute-lft-out |
| 14× | associate-/r* |
| 9× | flip-+ |
| 9× | flip3-+ |
| 8× | add-exp-log |
| 6× | add-log-exp |
| 6× | associate-/l* |
| 6× | add-cbrt-cube |
| 4× | pow1 |
| 3× | sqrt-prod |
| 3× | frac-2neg |
| 3× | clear-num |
| 2× | frac-add |
| 2× | div-exp |
| 2× | sqrt-div |
| 1× | associate-/l/ |
| 1× | sum-log |
| 1× | rec-exp |
| 1× | +-commutative |
| 1× | cbrt-undiv |
| 9.0ms | (/ (/ 1 (+ x 1)) (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1))))) |
| 5.0ms | (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1)))) |
| 1.0ms | (/ x (sqrt (+ x 1))) |
| 1.0ms | (/ x (sqrt x)) |
| 58.0ms | (/ (/ 1 (+ x 1)) (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1))))) |
| 37.0ms | (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1)))) |
| 21.0ms | (/ x (sqrt (+ x 1))) |
| 18.0ms | (/ x (sqrt x)) |
| 172.0ms | (+ (* (/ x (sqrt x)) (/ x (sqrt x))) (- (* (/ x (sqrt (+ x 1))) (/ x (sqrt (+ x 1)))) (* (/ x (sqrt x)) (/ x (sqrt (+ x 1)))))) |
| 168.0ms | (/ (/ 1 (+ x 1)) (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1))))) |
| 167.0ms | (/ (/ 1 (+ x 1)) (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1))))) |
| 167.0ms | (/ (/ 1 (+ x 1)) (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1))))) |
| 165.0ms | (/ (/ 1 (+ x 1)) (+ (/ x (sqrt x)) (/ x (sqrt (+ x 1))))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 0b
0% (0.3b remaining)
Error of 0.4b against oracle of 0.0b and baseline of 0.4b