



Bits error versus x
| Original | 9.8 |
|---|---|
| Target | 0.3 |
| Herbie | 0.1 |
Initial program 9.8
rmApplied frac-sub26.2
Applied frac-add25.4
Simplified25.9
Simplified25.9
Taylor expanded around inf 0.3
rmApplied associate-/r*0.1
Final simplification0.1
herbie shell --seed 2019016 +o rules:numerics
(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: 27.3s)Debug log
| 256× | (pre true 80) |
| 130× | (body real 80) |
| 49× | (body real 640) |
| 28× | (body real 320) |
| 27× | (body real 160) |
| 22× | (body real 1280) |
| 64.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 10.0b
Found 4 expressions with local error:
| 3.0b | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 0.0b | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 0.0b | (/ 1 (- x 1)) |
| 0.0b | (/ 1 (+ x 1)) |
| 48× | prod-diff |
| 45× | *-un-lft-identity |
| 32× | add-sqr-sqrt |
| 30× | div-inv |
| 28× | add-cube-cbrt |
| 26× | associate-+l+ |
| 22× | associate-/r/ |
| 11× | add-log-exp |
| 11× | flip-+ |
| 11× | flip3-+ |
| 8× | distribute-lft-out-- |
| 6× | distribute-lft-out |
| 6× | add-exp-log |
| 6× | fma-neg |
| 6× | fma-def |
| 6× | associate-/r* |
| 6× | pow1 |
| 4× | log1p-expm1-u |
| 4× | add-cbrt-cube |
| 4× | expm1-log1p-u |
| 3× | flip-- |
| 3× | frac-add |
| 3× | flip3-- |
| 2× | difference-of-squares |
| 2× | inv-pow |
| 2× | pow-flip |
| 2× | frac-sub |
| 2× | diff-log |
| 2× | frac-2neg |
| 2× | sub-neg |
| 2× | sum-log |
| 2× | clear-num |
| 2× | rec-exp |
| 1× | associate-+l- |
| 1× | +-commutative |
| 57.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 12.0ms | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 2.0ms | (/ 1 (+ x 1)) |
| 2.0ms | (/ 1 (- x 1)) |
| 61.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 18.0ms | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 13.0ms | (/ 1 (+ x 1)) |
| 11.0ms | (/ 1 (- x 1)) |
| 797.0ms | (+ (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) (* (* (+ x 1) x) 1)) |
| 636.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 520.0ms | (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1)) |
| 506.0ms | (fma (/ 1 (+ (pow x 3) (pow 1 3))) (+ (* x x) (- (* 1 1) (* x 1))) (- (* (sqrt (/ 2 x)) (sqrt (/ 2 x))))) |
| 488.0ms | (fma (/ 1 (+ (pow x 3) (pow 1 3))) (+ (* x x) (- (* 1 1) (* x 1))) (- (* (/ 2 x) 1))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 30.9b | (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) |
| 0.1b | (* (fma x x x) (+ -1 x)) |
| 0.0b | (+ x (fma -2 x -2)) |
| 0.0b | (/ (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) (* (fma x x x) (+ -1 x))) |
| 11× | add-exp-log |
| 11× | add-cbrt-cube |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | pow1 |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | associate-*r/ |
| 4× | expm1-log1p-u |
| 3× | associate-/l* |
| 3× | flip-+ |
| 3× | associate-*l* |
| 3× | associate-*r* |
| 3× | times-frac |
| 3× | flip3-+ |
| 2× | fma-udef |
| 2× | cbrt-unprod |
| 2× | associate-/r/ |
| 2× | prod-exp |
| 2× | div-exp |
| 2× | cbrt-undiv |
| 1× | div-inv |
| 1× | *-commutative |
| 1× | pow-prod-down |
| 1× | distribute-lft-in |
| 1× | frac-2neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | associate-+r+ |
| 1× | +-commutative |
| 1× | distribute-rgt-in |
| 11.0ms | (/ (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) (* (fma x x x) (+ -1 x))) |
| 8.0ms | (* (fma x x x) (+ -1 x)) |
| 2.0ms | (+ x (fma -2 x -2)) |
| 0.0ms | (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) |
| 124.0ms | (/ (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) (* (fma x x x) (+ -1 x))) |
| 121.0ms | (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) |
| 55.0ms | (* (fma x x x) (+ -1 x)) |
| 24.0ms | (+ x (fma -2 x -2)) |
| 598.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 498.0ms | (/ (* (cbrt (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x))) (cbrt (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)))) (fma x x x)) |
| 373.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
| 319.0ms | (/ (* (* (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x))) (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x))) (* (* (* (fma x x x) (fma x x x)) (fma x x x)) (* (* (+ -1 x) (+ -1 x)) (+ -1 x)))) |
| 318.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 0.9b | (/ 2 (* (fma x x x) (+ -1 x))) |
| 0.1b | (* (fma x x x) (+ -1 x)) |
| 4× | add-cube-cbrt |
| 4× | add-exp-log |
| 4× | associate-*r/ |
| 4× | add-cbrt-cube |
| 4× | *-un-lft-identity |
| 4× | pow1 |
| 4× | add-sqr-sqrt |
| 3× | associate-*l* |
| 3× | associate-*r* |
| 2× | add-log-exp |
| 2× | log1p-expm1-u |
| 2× | flip-+ |
| 2× | associate-/r/ |
| 2× | flip3-+ |
| 2× | expm1-log1p-u |
| 1× | div-inv |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | distribute-lft-in |
| 1× | frac-2neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | distribute-rgt-in |
| 4.0ms | (* (fma x x x) (+ -1 x)) |
| 1.0ms | (/ 2 (* (fma x x x) (+ -1 x))) |
| 56.0ms | (* (fma x x x) (+ -1 x)) |
| 36.0ms | (/ 2 (* (fma x x x) (+ -1 x))) |
| 540.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 320.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
| 263.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
| 168.0ms | (* (* (* (fma x x x) (fma x x x)) (fma x x x)) (* (* (+ -1 x) (+ -1 x)) (+ -1 x))) |
| 73.0ms | (* (fma x x x) (+ -1 x)) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0b
Found 2 expressions with local error:
| 0.1b | (/ 2 (fma x x x)) |
| 0.0b | (/ (/ 2 (fma x x x)) (+ -1 x)) |
| 12× | add-cube-cbrt |
| 12× | times-frac |
| 12× | *-un-lft-identity |
| 12× | add-sqr-sqrt |
| 6× | div-inv |
| 6× | associate-/r* |
| 4× | associate-/l* |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 2× | add-log-exp |
| 2× | log1p-expm1-u |
| 2× | associate-/r/ |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 1× | associate-/l/ |
| 1× | flip-+ |
| 1× | div-exp |
| 1× | flip3-+ |
| 1× | cbrt-undiv |
| 7.0ms | (/ (/ 2 (fma x x x)) (+ -1 x)) |
| 1.0ms | (/ 2 (fma x x x)) |
| 28.0ms | (/ (/ 2 (fma x x x)) (+ -1 x)) |
| 13.0ms | (/ 2 (fma x x x)) |
| 759.0ms | (- (+ (* 2 (/ 1 (pow x 4))) (* 2 (/ 1 (pow x 2)))) (* 2 (/ 1 (pow x 3)))) |
| 759.0ms | (- (+ (* 2 (/ 1 (pow x 4))) (* 2 (/ 1 (pow x 2)))) (* 2 (/ 1 (pow x 3)))) |
| 535.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 313.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
| 253.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0b
0% (0.1b remaining)
Error of 0.1b against oracle of 0.0b and baseline of 0.1b
| 8004× | (pre true 80) |
| 4141× | (body real 80) |
| 1874× | (body real 640) |
| 914× | (body real 320) |
| 544× | (body real 1280) |
| 531× | (body real 160) |