



Bits error versus x
| Original | 9.7 |
|---|---|
| Target | 0.3 |
| Herbie | 0.5 |
if x < -0.9876686633063027Initial program 19.4
Taylor expanded around inf 0.6
Simplified0.4
rmApplied associate-/l/0.6
if -0.9876686633063027 < x < 0.9941898984045208Initial program 0.0
Taylor expanded around 0 0.4
Simplified0.4
Taylor expanded around 0 0.4
Simplified0.4
if 0.9941898984045208 < x Initial program 20.0
Taylor expanded around inf 0.8
Simplified0.3
rmApplied associate-/r*0.3
Final simplification0.5
herbie shell --seed 2019010 +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: 25.2s)Debug log
| 74.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:
| 2.6b | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 0.0b | (/ 1 (- x 1)) |
| 0.0b | (/ 1 (+ x 1)) |
| 0.0b | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 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 |
| 37.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)) |
| 50.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 11.0ms | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 6.0ms | (/ 1 (- x 1)) |
| 6.0ms | (/ 1 (+ x 1)) |
| 646.0ms | (+ (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) (* (* (+ x 1) x) 1)) |
| 626.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 530.0ms | (fma (/ 1 (+ (pow x 3) (pow 1 3))) (+ (* x x) (- (* 1 1) (* x 1))) (- (* (sqrt (/ 2 x)) (sqrt (/ 2 x))))) |
| 492.0ms | (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1)) |
| 462.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 3 expressions with local error:
| 0.0b | (/ 1 (- x 1)) |
| 0.0b | (+ (+ (/ -2 x) (- 1 x)) (/ 1 (- x 1))) |
| 0.0b | (+ (/ -2 x) (- 1 x)) |
| 18× | *-un-lft-identity |
| 10× | add-log-exp |
| 8× | distribute-lft-out |
| 8× | frac-add |
| 8× | fma-def |
| 6× | add-cube-cbrt |
| 6× | add-sqr-sqrt |
| 4× | div-inv |
| 4× | add-exp-log |
| 4× | sum-log |
| 4× | pow1 |
| 3× | flip-- |
| 3× | log1p-expm1-u |
| 3× | flip-+ |
| 3× | add-cbrt-cube |
| 3× | flip3-- |
| 3× | flip3-+ |
| 3× | associate-/r* |
| 3× | expm1-log1p-u |
| 2× | associate-/r/ |
| 2× | associate-+r- |
| 2× | associate-+r+ |
| 2× | +-commutative |
| 1× | inv-pow |
| 1× | pow-flip |
| 1× | associate-+l- |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 1× | associate-+l+ |
| 1× | rec-exp |
| 35.0ms | (+ (+ (/ -2 x) (- 1 x)) (/ 1 (- x 1))) |
| 7.0ms | (+ (/ -2 x) (- 1 x)) |
| 2.0ms | (/ 1 (- x 1)) |
| 15.0ms | (+ (+ (/ -2 x) (- 1 x)) (/ 1 (- x 1))) |
| 10.0ms | (/ 1 (- x 1)) |
| 7.0ms | (+ (/ -2 x) (- 1 x)) |
| 839.0ms | (* (- (/ -2 x) (- 1 x)) (- x 1)) |
| 480.0ms | (+ (* (+ (* -2 (+ (* 1 1) (+ (* x x) (* 1 x)))) (* x (- (pow 1 3) (pow x 3)))) (- x 1)) (* (* x (+ (* 1 1) (+ (* x x) (* 1 x)))) 1)) |
| 444.0ms | (* (* x (+ 1 x)) (- x 1)) |
| 364.0ms | (- (+ (* 2 x) (+ (pow x 2) (* 2 (/ 1 x))))) |
| 346.0ms | (* (* x (+ (* 1 1) (+ (* x x) (* 1 x)))) (- x 1)) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.0b
Found 0 expressions with local error:
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.1b | (/ (/ 2 x) (* x x)) |
| 0.1b | (/ 2 (pow x 7)) |
| 0.0b | (/ 2 (pow x 5)) |
| 0.0b | (+ (+ (/ (/ 2 x) (* x x)) (/ 2 (pow x 7))) (/ 2 (pow x 5))) |
| 16× | *-un-lft-identity |
| 9× | add-log-exp |
| 9× | add-cube-cbrt |
| 9× | add-sqr-sqrt |
| 7× | associate-/r* |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 5× | div-inv |
| 4× | associate-/l* |
| 4× | distribute-lft-out |
| 4× | log1p-expm1-u |
| 4× | frac-add |
| 4× | times-frac |
| 4× | fma-def |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | frac-2neg |
| 3× | sum-log |
| 3× | clear-num |
| 2× | flip-+ |
| 2× | flip3-+ |
| 1× | associate-/l/ |
| 1× | div-exp |
| 1× | associate-+l+ |
| 1× | +-commutative |
| 1× | cbrt-undiv |
| 57.0ms | (+ (+ (/ (/ 2 x) (* x x)) (/ 2 (pow x 7))) (/ 2 (pow x 5))) |
| 6.0ms | (/ (/ 2 x) (* x x)) |
| 1.0ms | (/ 2 (pow x 7)) |
| 1.0ms | (/ 2 (pow x 5)) |
| 40.0ms | (+ (+ (/ (/ 2 x) (* x x)) (/ 2 (pow x 7))) (/ 2 (pow x 5))) |
| 28.0ms | (/ 2 (pow x 7)) |
| 25.0ms | (/ 2 (pow x 5)) |
| 22.0ms | (/ (/ 2 x) (* x x)) |
| 556.0ms | (* (+ (* (/ (/ 2 x) (* x x)) (/ (/ 2 x) (* x x))) (- (* (/ 2 (pow x 7)) (/ 2 (pow x 7))) (* (/ (/ 2 x) (* x x)) (/ 2 (pow x 7))))) (pow x 5)) |
| 539.0ms | (/ (* (* (/ 2 x) (/ 2 x)) (/ 2 x)) (* (* (* x x) (* x x)) (* x x))) |
| 374.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
| 347.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
| 323.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
6 alts after pruning (5 fresh and 1 done)
Merged error: 0.0b
98.7% (0.4b remaining)
Error of 0.5b against oracle of 0.0b and baseline of 31.0b