



Bits error versus x
Results
| Original | 20.6 |
|---|---|
| Target | 0.7 |
| Herbie | 0.7 |
Initial program 20.6
rmApplied frac-sub20.5
Simplified20.5
rmApplied flip--20.3
Applied associate-/l/20.3
Simplified0.8
rmApplied pow10.8
Applied pow10.8
Applied pow-prod-down0.8
Simplified0.7
Final simplification0.7
herbie shell --seed 1137770271
(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: 24.5s)Debug log
| 66× | 45.0ms | (body real 640) |
| 249× | 40.0ms | (body nan 80) |
| 28× | 25.0ms | (body real 1280) |
| 125× | 21.0ms | (body real 80) |
| 28× | 14.0ms | (body real 320) |
| 505× | 11.0ms | (pre true 80) |
| 9× | 3.0ms | (body real 160) |
| 12.0ms | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 21.2b
Found 4 expressions with local error:
| 2.1b | (- (/ 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 |
| 32.0ms | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
| 4.0ms | (/ 1 (sqrt x)) |
| 3.0ms | (/ 1 (sqrt (+ x 1))) |
| 1.0ms | (sqrt (+ x 1)) |
| 53.0ms | (- (/ 1 (sqrt x)) (/ 1 (sqrt (+ x 1)))) |
| 26.0ms | (/ 1 (sqrt (+ x 1))) |
| 24.0ms | (/ 1 (sqrt x)) |
| 23.0ms | (sqrt (+ x 1)) |
| 92.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 80.0ms | (- (+ (* 3/8 (pow x 2)) 1) (* 1/2 x)) |
| 51.0ms | (sqrt (+ (* x x) (- (* 1 1) (* x 1)))) |
| 41.0ms | (- (* 1 (sqrt (+ x 1))) (* (sqrt x) 1)) |
| 34.0ms | (/ (exp (/ 1 (sqrt x))) (exp (/ 1 (sqrt (+ x 1))))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 20.6b
Found 4 expressions with local error:
| 2.1b | (- (sqrt (+ x 1)) (sqrt x)) |
| 0.3b | (* (sqrt x) (sqrt (+ x 1))) |
| 0.2b | (/ (- (sqrt (+ x 1)) (sqrt x)) (* (sqrt x) (sqrt (+ x 1)))) |
| 0.0b | (sqrt (+ x 1)) |
| 23× | add-sqr-sqrt |
| 16× | *-un-lft-identity |
| 11× | add-exp-log |
| 11× | add-cbrt-cube |
| 10× | add-cube-cbrt |
| 9× | sqrt-prod |
| 6× | difference-of-squares |
| 6× | add-log-exp |
| 6× | associate-/l* |
| 6× | associate-*r* |
| 6× | sqrt-div |
| 6× | times-frac |
| 6× | pow1 |
| 4× | associate-*r/ |
| 3× | distribute-lft-out-- |
| 3× | flip-+ |
| 3× | associate-*l* |
| 3× | pow1/2 |
| 3× | flip3-+ |
| 2× | associate-/l/ |
| 2× | flip-- |
| 2× | cbrt-unprod |
| 2× | associate-/r/ |
| 2× | prod-exp |
| 2× | pow-prod-down |
| 2× | div-exp |
| 2× | flip3-- |
| 2× | cbrt-undiv |
| 1× | div-inv |
| 1× | *-commutative |
| 1× | div-sub |
| 1× | diff-log |
| 1× | sqrt-unprod |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 35.0ms | (/ (- (sqrt (+ x 1)) (sqrt x)) (* (sqrt x) (sqrt (+ x 1)))) |
| 13.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 10.0ms | (* (sqrt x) (sqrt (+ x 1))) |
| 1.0ms | (sqrt (+ x 1)) |
| 118.0ms | (/ (- (sqrt (+ x 1)) (sqrt x)) (* (sqrt x) (sqrt (+ x 1)))) |
| 50.0ms | (- (sqrt (+ x 1)) (sqrt x)) |
| 44.0ms | (* (sqrt x) (sqrt (+ x 1))) |
| 23.0ms | (sqrt (+ x 1)) |
| 425.0ms | (* (* (* (sqrt x) (sqrt x)) (sqrt x)) (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1)))) |
| 139.0ms | (/ (* (* (- (sqrt (+ x 1)) (sqrt x)) (- (sqrt (+ x 1)) (sqrt x))) (- (sqrt (+ x 1)) (sqrt x))) (* (* (* (sqrt x) (sqrt x)) (sqrt x)) (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1))))) |
| 118.0ms | (/ (* (* (- (sqrt (+ x 1)) (sqrt x)) (- (sqrt (+ x 1)) (sqrt x))) (- (sqrt (+ x 1)) (sqrt x))) (* (* (* (sqrt x) (sqrt (+ x 1))) (* (sqrt x) (sqrt (+ x 1)))) (* (sqrt x) (sqrt (+ x 1))))) |
| 90.0ms | (- (+ (* 1/2 x) 1) (* 1/8 (pow x 2))) |
| 75.0ms | (- (+ x 1/2) (* 1/8 (/ 1 x))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.3b
Found 4 expressions with local error:
| 0.3b | (/ 1 (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x)))) |
| 0.3b | (* (sqrt x) (sqrt (+ x 1))) |
| 0.1b | (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 0.0b | (sqrt (+ x 1)) |
| 18× | associate-*r/ |
| 17× | add-exp-log |
| 17× | pow1 |
| 16× | sqrt-div |
| 14× | flip-+ |
| 14× | flip3-+ |
| 11× | add-cbrt-cube |
| 11× | *-un-lft-identity |
| 10× | associate-*r* |
| 10× | add-sqr-sqrt |
| 9× | add-cube-cbrt |
| 8× | associate-/r/ |
| 8× | pow-prod-down |
| 8× | frac-times |
| 7× | prod-exp |
| 6× | sqrt-prod |
| 4× | add-log-exp |
| 4× | cbrt-unprod |
| 4× | associate-*l/ |
| 4× | associate-*l* |
| 3× | pow-flip |
| 3× | pow1/2 |
| 3× | rec-exp |
| 2× | *-commutative |
| 1× | inv-pow |
| 1× | distribute-lft-out |
| 1× | div-inv |
| 1× | sqrt-unprod |
| 1× | distribute-lft-in |
| 1× | frac-2neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | rem-sqrt-square |
| 1× | distribute-rgt-in |
| 42.0ms | (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 38.0ms | (/ 1 (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x)))) |
| 10.0ms | (* (sqrt x) (sqrt (+ x 1))) |
| 1.0ms | (sqrt (+ x 1)) |
| 153.0ms | (/ 1 (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x)))) |
| 134.0ms | (* (* (sqrt x) (sqrt (+ x 1))) (+ (sqrt (+ x 1)) (sqrt x))) |
| 45.0ms | (* (sqrt x) (sqrt (+ x 1))) |
| 21.0ms | (sqrt (+ x 1)) |
| 535.0ms | (* (sqrt (- x 1)) (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x))))) |
| 528.0ms | (* (sqrt (- x 1)) (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x))))) |
| 442.0ms | (* (sqrt (+ (* x x) (- (* 1 1) (* x 1)))) (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x))))) |
| 439.0ms | (* (sqrt (+ (* x x) (- (* 1 1) (* x 1)))) (+ (* (sqrt (+ x 1)) (sqrt (+ x 1))) (- (* (sqrt x) (sqrt x)) (* (sqrt (+ x 1)) (sqrt x))))) |
| 433.0ms | (* (* (* (sqrt x) (sqrt x)) (sqrt x)) (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1)))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.3b | (/ 1 (pow (+ (* x (sqrt (+ x 1))) (* (+ x 1) (sqrt x))) 1)) |
| 0.1b | (* x (sqrt (+ x 1))) |
| 0.1b | (* (+ x 1) (sqrt x)) |
| 0.0b | (+ (* x (sqrt (+ x 1))) (* (+ x 1) (sqrt x))) |
| 10× | add-cube-cbrt |
| 10× | *-un-lft-identity |
| 10× | add-sqr-sqrt |
| 9× | associate-*r* |
| 8× | add-exp-log |
| 7× | flip-+ |
| 7× | flip3-+ |
| 6× | add-log-exp |
| 6× | associate-*r/ |
| 6× | associate-*l/ |
| 6× | sqrt-div |
| 6× | add-cbrt-cube |
| 6× | associate-/r* |
| 6× | pow1 |
| 4× | frac-add |
| 3× | sqrt-prod |
| 3× | associate-*l* |
| 3× | unpow-prod-down |
| 3× | rec-exp |
| 2× | *-commutative |
| 1× | inv-pow |
| 1× | pow-flip |
| 1× | div-inv |
| 1× | cbrt-unprod |
| 1× | prod-exp |
| 1× | pow-exp |
| 1× | pow-prod-down |
| 1× | frac-2neg |
| 1× | sum-log |
| 1× | clear-num |
| 1× | +-commutative |
| 1× | pow-to-exp |
| 16.0ms | (/ 1 (pow (+ (* x (sqrt (+ x 1))) (* (+ x 1) (sqrt x))) 1)) |
| 13.0ms | (+ (* x (sqrt (+ x 1))) (* (+ x 1) (sqrt x))) |
| 10.0ms | (* (+ x 1) (sqrt x)) |
| 4.0ms | (* x (sqrt (+ x 1))) |
| 105.0ms | (/ 1 (pow (+ (* x (sqrt (+ x 1))) (* (+ x 1) (sqrt x))) 1)) |
| 82.0ms | (+ (* x (sqrt (+ x 1))) (* (+ x 1) (sqrt x))) |
| 43.0ms | (* (+ x 1) (sqrt x)) |
| 43.0ms | (* x (sqrt (+ x 1))) |
| 478.0ms | (* (* (* (+ x 1) (+ x 1)) (+ x 1)) (* (* (sqrt x) (sqrt x)) (sqrt x))) |
| 460.0ms | (+ (* (* x (sqrt (- (* x x) (* 1 1)))) (+ (* x x) (- (* 1 1) (* x 1)))) (* (sqrt (- x 1)) (* (+ (pow x 3) (pow 1 3)) (sqrt x)))) |
| 438.0ms | (+ (* (* x (sqrt (+ (pow x 3) (pow 1 3)))) (- x 1)) (* (sqrt (+ (* x x) (- (* 1 1) (* x 1)))) (* (- (* x x) (* 1 1)) (sqrt x)))) |
| 427.0ms | (+ (* (* x (sqrt (+ (pow x 3) (pow 1 3)))) (+ (* x x) (- (* 1 1) (* x 1)))) (* (sqrt (+ (* x x) (- (* 1 1) (* x 1)))) (* (+ (pow x 3) (pow 1 3)) (sqrt x)))) |
| 354.0ms | (+ (* (* x (sqrt (- (* x x) (* 1 1)))) (- x 1)) (* (sqrt (- x 1)) (* (- (* x x) (* 1 1)) (sqrt x)))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 0.0b
0% (0.7b remaining)
Error of 0.7b against oracle of 0.0b and baseline of 0.7b
| 1847× | 1.4s | (body real 640) |
| 1096× | 1.4s | (body real 1280) |
| 7935× | 1.1s | (body nan 80) |
| 4008× | 634.0ms | (body real 80) |
| 712× | 380.0ms | (body real 320) |
| 15935× | 364.0ms | (pre true 80) |
| 337× | 106.0ms | (body real 160) |