



Bits error versus x
Results
| Original | 10.5 |
|---|---|
| Target | 0.3 |
| Herbie | 0.1 |
Initial program 10.5
rmApplied frac-sub26.4
Applied frac-add25.8
Taylor expanded around inf 0.3
rmApplied associate-/r*0.1
Final simplification0.1
herbie shell --seed 1137770271
(FPCore (x)
:name "3frac (problem 3.3.3)"
:herbie-target
(/ 2 (* x (- (* x x) 1)))
(+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))))
Time bar (total: 2.7m)Debug log
| 63× | 48.0ms | (body real 640) |
| 144× | 28.0ms | (body real 80) |
| 26× | 14.0ms | (body real 320) |
| 11× | 11.0ms | (body real 1280) |
| 256× | 6.0ms | (pre true 80) |
| 12× | 5.0ms | (body real 160) |
| 81.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 8.7b
Found 2 expressions with local error:
| 1.7b | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 0.0b | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 16× | *-un-lft-identity |
| 9× | add-log-exp |
| 6× | distribute-lft-out-- |
| 6× | distribute-lft-out |
| 6× | div-inv |
| 4× | add-sqr-sqrt |
| 3× | frac-add |
| 2× | flip-- |
| 2× | add-cube-cbrt |
| 2× | frac-sub |
| 2× | add-exp-log |
| 2× | diff-log |
| 2× | add-cbrt-cube |
| 2× | flip3-- |
| 2× | sub-neg |
| 2× | sum-log |
| 2× | associate-+l+ |
| 2× | pow1 |
| 1× | difference-of-squares |
| 1× | flip-+ |
| 1× | associate-+l- |
| 1× | flip3-+ |
| 1× | +-commutative |
| 51.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 12.0ms | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 80.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 22.0ms | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 609.0ms | (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1)) |
| 564.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 471.0ms | (+ (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) (* (* (+ x 1) x) 1)) |
| 384.0ms | (* (* (+ x 1) x) (- x 1)) |
| 355.0ms | (* (+ (* (/ 1 (+ x 1)) (/ 1 (+ x 1))) (+ (* (/ 2 x) (/ 2 x)) (* (/ 1 (+ x 1)) (/ 2 x)))) (- x 1)) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 16.0b | (/ (- (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (/ 1 (+ x 1)) (/ 2 x))) (* (/ 1 (- x 1)) (/ 1 (- x 1)))) (- (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1)))) |
| 1.7b | (- (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (/ 1 (+ x 1)) (/ 2 x))) (* (/ 1 (- x 1)) (/ 1 (- x 1)))) |
| 0.3b | (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (/ 1 (+ x 1)) (/ 2 x))) |
| 0.1b | (* (/ 1 (- x 1)) (/ 1 (- x 1))) |
| 196× | frac-sub |
| 112× | frac-times |
| 85× | *-un-lft-identity |
| 78× | flip-- |
| 78× | flip3-- |
| 62× | associate-/l/ |
| 58× | associate-*r/ |
| 58× | associate-*l/ |
| 54× | distribute-lft-out-- |
| 40× | times-frac |
| 38× | add-sqr-sqrt |
| 31× | un-div-inv |
| 30× | div-inv |
| 24× | add-cube-cbrt |
| 20× | pow1 |
| 19× | difference-of-squares |
| 16× | add-exp-log |
| 12× | associate-*l* |
| 12× | associate-*r* |
| 10× | add-cbrt-cube |
| 10× | associate-/r* |
| 9× | associate-/r/ |
| 6× | add-log-exp |
| 6× | inv-pow |
| 6× | pow-flip |
| 6× | pow-prod-up |
| 5× | prod-exp |
| 5× | sub-neg |
| 4× | associate-/l* |
| 4× | associate--l+ |
| 4× | pow-prod-down |
| 4× | distribute-lft-in |
| 4× | rec-exp |
| 4× | distribute-rgt-in |
| 2× | cbrt-unprod |
| 2× | *-commutative |
| 2× | pow-plus |
| 2× | pow2 |
| 1× | div-exp |
| 1× | div-sub |
| 1× | diff-log |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 143.0ms | (/ (- (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (/ 1 (+ x 1)) (/ 2 x))) (* (/ 1 (- x 1)) (/ 1 (- x 1)))) (- (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1)))) |
| 42.0ms | (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (/ 1 (+ x 1)) (/ 2 x))) |
| 40.0ms | (- (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (/ 1 (+ x 1)) (/ 2 x))) (* (/ 1 (- x 1)) (/ 1 (- x 1)))) |
| 11.0ms | (* (/ 1 (- x 1)) (/ 1 (- x 1))) |
| 225.0ms | (/ (- (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (/ 1 (+ x 1)) (/ 2 x))) (* (/ 1 (- x 1)) (/ 1 (- x 1)))) (- (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1)))) |
| 89.0ms | (- (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (/ 1 (+ x 1)) (/ 2 x))) (* (/ 1 (- x 1)) (/ 1 (- x 1)))) |
| 28.0ms | (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (/ 1 (+ x 1)) (/ 2 x))) |
| 17.0ms | (* (/ 1 (- x 1)) (/ 1 (- x 1))) |
| 1.3s | (- (* (* (- (* 1 x) (* (+ x 1) 2)) (- (/ 1 (+ x 1)) (/ 2 x))) (- x 1)) (* (* (+ x 1) x) (* 1 (/ 1 (- x 1))))) |
| 1.1s | (* (* (* (+ x 1) x) (* (+ x 1) x)) (* (- x 1) (- x 1))) |
| 1.0s | (* (* (+ (/ 1 (+ x 1)) (/ 2 x)) (+ (/ 1 (+ x 1)) (/ 2 x))) (* (- x 1) (- x 1))) |
| 988.0ms | (- (* (* (- (/ 1 (+ x 1)) (/ 2 x)) (- (* 1 x) (* (+ x 1) 2))) (* (- x 1) (- x 1))) (* (* (+ x 1) x) (* 1 1))) |
| 968.0ms | (- (* (* (- (* 1 x) (* (+ x 1) 2)) (- (/ 1 (+ x 1)) (/ 2 x))) (* (- x 1) (- x 1))) (* (* (+ x 1) x) (* 1 1))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 17.9b | (+ (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) (* (* (+ x 1) x) 1)) |
| 0.2b | (- (* 1 x) (* (+ x 1) 2)) |
| 0.0b | (* (* (+ x 1) x) (- x 1)) |
| 0.0b | (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) |
| 46× | associate-*l/ |
| 22× | flip-- |
| 22× | flip3-- |
| 16× | frac-add |
| 16× | frac-times |
| 12× | flip-+ |
| 12× | flip3-+ |
| 8× | add-log-exp |
| 8× | add-exp-log |
| 8× | associate-*r/ |
| 8× | add-cbrt-cube |
| 8× | pow1 |
| 7× | add-cube-cbrt |
| 7× | *-un-lft-identity |
| 7× | sub-neg |
| 7× | add-sqr-sqrt |
| 6× | associate-*r* |
| 6× | distribute-lft-in |
| 6× | distribute-rgt-in |
| 4× | associate-*l* |
| 4× | associate-+l+ |
| 2× | cbrt-unprod |
| 2× | *-commutative |
| 2× | prod-exp |
| 2× | pow-prod-down |
| 1× | diff-log |
| 1× | sum-log |
| 1× | +-commutative |
| 27.0ms | (+ (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) (* (* (+ x 1) x) 1)) |
| 19.0ms | (* (* (+ x 1) x) (- x 1)) |
| 15.0ms | (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) |
| 5.0ms | (- (* 1 x) (* (+ x 1) 2)) |
| 75.0ms | (* (* (+ x 1) x) (- x 1)) |
| 22.0ms | (- (* 1 x) (* (+ x 1) 2)) |
| 21.0ms | (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) |
| 4.0ms | (+ (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) (* (* (+ x 1) x) 1)) |
| 1.4s | (+ (* (* (- (pow (* 1 x) 3) (pow (* (+ x 1) 2) 3)) (- (pow x 3) (pow 1 3))) (+ (* x x) (- (* 1 1) (* x 1)))) (* (* (+ (* (* 1 x) (* 1 x)) (+ (* (* (+ x 1) 2) (* (+ x 1) 2)) (* (* 1 x) (* (+ x 1) 2)))) (+ (* x x) (+ (* 1 1) (* x 1)))) (* (* (+ (pow x 3) (pow 1 3)) x) 1))) |
| 1.0s | (+ (* (* (- (pow (* 1 x) 3) (pow (* (+ x 1) 2) 3)) (- (pow x 3) (pow 1 3))) (- x 1)) (* (* (+ (* (* 1 x) (* 1 x)) (+ (* (* (+ x 1) 2) (* (+ x 1) 2)) (* (* 1 x) (* (+ x 1) 2)))) (+ (* x x) (+ (* 1 1) (* x 1)))) (* (* (- (* x x) (* 1 1)) x) 1))) |
| 1.0s | (* (- (* (* 1 x) (* 1 x)) (* (* (+ x 1) 2) (* (+ x 1) 2))) (- (pow x 3) (pow 1 3))) |
| 864.0ms | (* (+ (* 1 x) (* (+ x 1) 2)) (+ (* x x) (+ (* 1 1) (* x 1)))) |
| 818.0ms | (+ (* (* (- (* (* 1 x) (* 1 x)) (* (* (+ x 1) 2) (* (+ x 1) 2))) (- (pow x 3) (pow 1 3))) (+ (* x x) (- (* 1 1) (* x 1)))) (* (* (+ (* 1 x) (* (+ x 1) 2)) (+ (* x x) (+ (* 1 1) (* x 1)))) (* (* (+ (pow x 3) (pow 1 3)) x) 1))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 0.2b | (/ 2 (* (* (+ x 1) x) (- x 1))) |
| 0.0b | (* (* (+ x 1) x) (- x 1)) |
| 0.0b | (* (+ x 1) x) |
| 18× | associate-*l/ |
| 8× | associate-/r/ |
| 8× | frac-times |
| 7× | flip-+ |
| 7× | flip3-+ |
| 6× | flip-- |
| 6× | flip3-- |
| 5× | add-cube-cbrt |
| 5× | add-exp-log |
| 5× | add-cbrt-cube |
| 5× | *-un-lft-identity |
| 5× | pow1 |
| 5× | add-sqr-sqrt |
| 4× | associate-*r/ |
| 4× | associate-*l* |
| 3× | add-log-exp |
| 3× | associate-*r* |
| 2× | *-commutative |
| 2× | distribute-lft-in |
| 2× | sub-neg |
| 2× | distribute-rgt-in |
| 1× | div-inv |
| 1× | cbrt-unprod |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | frac-2neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 19.0ms | (* (* (+ x 1) x) (- x 1)) |
| 6.0ms | (/ 2 (* (* (+ x 1) x) (- x 1))) |
| 6.0ms | (* (+ x 1) x) |
| 79.0ms | (* (* (+ x 1) x) (- x 1)) |
| 48.0ms | (/ 2 (* (* (+ x 1) x) (- x 1))) |
| 39.0ms | (* (+ x 1) x) |
| 656.0ms | (* (* (- (* x x) (* 1 1)) x) (- (pow x 3) (pow 1 3))) |
| 598.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 526.0ms | (* (* (- (* x x) (* 1 1)) x) (- x 1)) |
| 447.0ms | (* (* (+ (pow x 3) (pow 1 3)) x) (- (* x x) (* 1 1))) |
| 397.0ms | (* (* (+ (pow x 3) (pow 1 3)) x) (- (pow x 3) (pow 1 3))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0b
0% (0.1b remaining)
Error of 0.1b against oracle of 0.0b and baseline of 0.1b
| 1961× | 2.1s | (body real 640) |
| 4102× | 801.0ms | (body real 80) |
| 936× | 612.0ms | (body real 320) |
| 531× | 501.0ms | (body real 1280) |
| 8004× | 201.0ms | (pre true 80) |
| 474× | 180.0ms | (body real 160) |