



Bits error versus x
Results
| Original | 58.8 |
|---|---|
| Target | 0.4 |
| Herbie | 0.4 |
Initial program 58.8
Taylor expanded around 0 0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019010
(FPCore (x)
:name "expm1 (example 3.7)"
:pre (< -0.00017 x)
:herbie-target
(* x (+ (+ 1 (/ x 2)) (/ (* x x) 6)))
(- (exp x) 1))
Time bar (total: 35.4s)Debug log
| 6.0ms | (- (exp x) 1) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 59.3b
Found 1 expressions with local error:
| 6.2b | (- (exp x) 1) |
| 2× | add-sqr-sqrt |
| 1× | add-log-exp |
| 1× | flip-- |
| 1× | add-cube-cbrt |
| 1× | add-exp-log |
| 1× | difference-of-sqr-1 |
| 1× | add-cbrt-cube |
| 1× | flip3-- |
| 1× | *-un-lft-identity |
| 1× | sub-neg |
| 1× | pow1 |
| 3.0ms | (- (exp x) 1) |
| 12.0ms | (- (exp x) 1) |
| 110.0ms | (+ x (+ (* 1/6 (pow x 3)) (* 1/2 (pow x 2)))) |
| 4.0ms | (- (exp x) 1) |
| 4.0ms | (- (exp x) 1) |
| 4.0ms | (+ (sqrt (exp x)) 1) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 0.3b | (* x 1/6) |
| 0.0b | (* (+ (* x 1/6) 1/2) (* x x)) |
| 0.0b | (+ x (* (+ (* x 1/6) 1/2) (* x x))) |
| 5× | add-exp-log |
| 5× | add-cbrt-cube |
| 5× | pow1 |
| 4× | add-cube-cbrt |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 3× | add-log-exp |
| 3× | associate-*l* |
| 2× | flip-+ |
| 2× | *-commutative |
| 2× | associate-*l/ |
| 2× | flip3-+ |
| 1× | cbrt-unprod |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | associate-*r* |
| 1× | +-commutative |
| 10.0ms | (* (+ (* x 1/6) 1/2) (* x x)) |
| 3.0ms | (+ x (* (+ (* x 1/6) 1/2) (* x x))) |
| 0.0ms | (* x 1/6) |
| 27.0ms | (* (+ (* x 1/6) 1/2) (* x x)) |
| 14.0ms | (+ x (* (+ (* x 1/6) 1/2) (* x x))) |
| 9.0ms | (* x 1/6) |
| 429.0ms | (* (- (* (* x 1/6) (* x 1/6)) (* 1/2 1/2)) (* x x)) |
| 322.0ms | (* (+ (pow (* x 1/6) 3) (pow 1/2 3)) (* x x)) |
| 134.0ms | (+ x (+ (* 1/6 (pow x 3)) (* 1/2 (pow x 2)))) |
| 118.0ms | (+ x (+ (* 1/6 (pow x 3)) (* 1/2 (pow x 2)))) |
| 101.0ms | (+ x (+ (* 1/6 (pow x 3)) (* 1/2 (pow x 2)))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 41.3b | (/ (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)) (+ (* x x) (- (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x))) (* x (* (+ (* x 1/6) 1/2) (* x x)))))) |
| 0.3b | (* x 1/6) |
| 0.3b | (* x 1/6) |
| 0.3b | (* x 1/6) |
| 22× | *-un-lft-identity |
| 15× | times-frac |
| 14× | add-cube-cbrt |
| 14× | add-sqr-sqrt |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 5× | associate-/l* |
| 4× | add-log-exp |
| 4× | distribute-lft-out |
| 4× | sum-cubes |
| 4× | pow1 |
| 3× | *-commutative |
| 3× | associate-/r* |
| 2× | associate-/l/ |
| 2× | flip-+ |
| 2× | associate-/r/ |
| 2× | flip3-+ |
| 1× | div-inv |
| 1× | div-exp |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 95.0ms | (/ (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)) (+ (* x x) (- (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x))) (* x (* (+ (* x 1/6) 1/2) (* x x)))))) |
| 0.0ms | (* x 1/6) |
| 0.0ms | (* x 1/6) |
| 0.0ms | (* x 1/6) |
| 86.0ms | (/ (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)) (+ (* x x) (- (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x))) (* x (* (+ (* x 1/6) 1/2) (* x x)))))) |
| 14.0ms | (* x 1/6) |
| 12.0ms | (* x 1/6) |
| 9.0ms | (* x 1/6) |
| 616.0ms | (sqrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 522.0ms | (/ (sqrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) 1) |
| 504.0ms | (* (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)))) |
| 498.0ms | (/ (* (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)))) 1) |
| 376.0ms | (/ (* (* (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)) (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) (* (* (+ (* x x) (- (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x))) (* x (* (+ (* x 1/6) 1/2) (* x x))))) (+ (* x x) (- (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x))) (* x (* (+ (* x 1/6) 1/2) (* x x)))))) (+ (* x x) (- (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x))) (* x (* (+ (* x 1/6) 1/2) (* x x))))))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0b
Found 4 expressions with local error:
| 39.7b | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 39.7b | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 39.7b | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 28.7b | (/ (+ (* x x) (- (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x))) (* x (* (+ (* x 1/6) 1/2) (* x x))))) (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)))) |
| 38× | *-un-lft-identity |
| 35× | cbrt-prod |
| 24× | add-cube-cbrt |
| 24× | times-frac |
| 24× | add-sqr-sqrt |
| 8× | associate-/r* |
| 8× | cbrt-div |
| 7× | distribute-lft-out |
| 7× | sum-cubes |
| 6× | add-exp-log |
| 5× | flip-+ |
| 5× | add-cbrt-cube |
| 5× | flip3-+ |
| 4× | add-log-exp |
| 4× | pow1 |
| 3× | associate-/l* |
| 3× | pow1/3 |
| 2× | associate-/l/ |
| 2× | associate-/r/ |
| 1× | div-inv |
| 1× | div-exp |
| 1× | div-sub |
| 1× | frac-2neg |
| 1× | associate-+r- |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 148.0ms | (/ (+ (* x x) (- (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x))) (* x (* (+ (* x 1/6) 1/2) (* x x))))) (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)))) |
| 5.0ms | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 4.0ms | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 4.0ms | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 388.0ms | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 305.0ms | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 270.0ms | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 125.0ms | (/ (+ (* x x) (- (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x))) (* x (* (+ (* x 1/6) 1/2) (* x x))))) (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)))) |
| 863.0ms | (/ (+ (* x x) (* (* (+ (* x 1/6) 1/2) (* x x)) (* (+ (* x 1/6) 1/2) (* x x)))) (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3)))) |
| 855.0ms | (cbrt (- (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
| 593.0ms | (/ 1 (sqrt (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))))) |
| 589.0ms | (cbrt (* (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))))) |
| 566.0ms | (cbrt (+ (pow x 3) (pow (* (+ (* x 1/6) 1/2) (* x x)) 3))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0b
0% (0.4b remaining)
Error of 0.4b against oracle of 0.0b and baseline of 0.4b