



Bits error versus x
Results
| Original | 29.3 |
|---|---|
| Target | 0.0 |
| Herbie | 0.7 |
Initial program 29.3
Taylor expanded around 0 0.7
rmApplied associate-+r+0.7
Final simplification0.7
herbie shell --seed 1042149663
(FPCore (x)
:name "exp2 (problem 3.3.7)"
:herbie-target
(* 4 (pow (sinh (/ x 2)) 2))
(+ (- (exp x) 2) (exp (- x))))
Time bar (total: 17.8s)Debug log
| 528× | (pre true 80) |
| 277× | (body real 80) |
| 177× | (body real 1280) |
| 44× | (body real 640) |
| 17× | (body real 320) |
| 13× | (body real 160) |
| 45.0ms | (+ (- (exp x) 2) (exp (- x))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 30.1b
Found 2 expressions with local error:
| 4.7b | (+ (- (exp x) 2) (exp (- x))) |
| 0.0b | (- (exp x) 2) |
| 4× | add-log-exp |
| 4× | frac-add |
| 4× | *-un-lft-identity |
| 3× | flip-- |
| 3× | flip3-- |
| 2× | add-cube-cbrt |
| 2× | add-exp-log |
| 2× | exp-diff |
| 2× | add-cbrt-cube |
| 2× | sub-neg |
| 2× | associate-+l+ |
| 2× | pow1 |
| 2× | exp-neg |
| 2× | add-sqr-sqrt |
| 2× | neg-sub0 |
| 1× | distribute-lft-out |
| 1× | flip-+ |
| 1× | associate-+l- |
| 1× | flip3-+ |
| 1× | sum-log |
| 1× | +-commutative |
| 29.0ms | (+ (- (exp x) 2) (exp (- x))) |
| 6.0ms | (- (exp x) 2) |
| 134.0ms | (+ (- (exp x) 2) (exp (- x))) |
| 16.0ms | (- (exp x) 2) |
| 461.0ms | (+ (* (- (pow (exp x) 3) (pow 2 3)) (exp x)) (* (+ (* (exp x) (exp x)) (+ (* 2 2) (* (exp x) 2))) (exp 0))) |
| 445.0ms | (+ (* (- (pow (exp x) 3) (pow 2 3)) (exp x)) (* (+ (* (exp x) (exp x)) (+ (* 2 2) (* (exp x) 2))) 1)) |
| 316.0ms | (+ (* (- (* (exp x) (exp x)) (* 2 2)) (exp x)) (* (+ (exp x) 2) (exp 0))) |
| 214.0ms | (+ (* (- (* (exp x) (exp x)) (* 2 2)) (exp x)) (* (+ (exp x) 2) 1)) |
| 139.0ms | (* (+ (* (exp x) (exp x)) (+ (* 2 2) (* (exp x) 2))) (exp x)) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.1b | (* 1/12 (pow x 4)) |
| 0.1b | (* 1/360 (pow x 6)) |
| 0.0b | (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6))) |
| 0.0b | (+ (pow x 2) (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6)))) |
| 11× | add-log-exp |
| 8× | *-un-lft-identity |
| 6× | add-cube-cbrt |
| 6× | associate-*r* |
| 6× | add-sqr-sqrt |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | sum-log |
| 4× | pow1 |
| 2× | flip-+ |
| 2× | *-commutative |
| 2× | flip3-+ |
| 2× | +-commutative |
| 1× | distribute-lft-out |
| 1× | associate-+r+ |
| 15.0ms | (+ (pow x 2) (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6)))) |
| 7.0ms | (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6))) |
| 3.0ms | (* 1/12 (pow x 4)) |
| 3.0ms | (* 1/360 (pow x 6)) |
| 105.0ms | (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6))) |
| 49.0ms | (+ (pow x 2) (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6)))) |
| 45.0ms | (* 1/360 (pow x 6)) |
| 32.0ms | (* 1/12 (pow x 4)) |
| 73.0ms | (* (exp (pow x 2)) (exp (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6))))) |
| 70.0ms | (* (exp (pow x 2)) (* (exp (* 1/12 (pow x 4))) (exp (* 1/360 (pow x 6))))) |
| 32.0ms | (+ (pow x 2) (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6)))) |
| 30.0ms | (+ (pow x 2) (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6)))) |
| 30.0ms | (+ (pow x 2) (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6)))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.1b | (* 1/12 (pow x 4)) |
| 0.1b | (* 1/360 (pow x 6)) |
| 0.0b | (+ (pow x 2) (* 1/12 (pow x 4))) |
| 0.0b | (+ (+ (pow x 2) (* 1/12 (pow x 4))) (* 1/360 (pow x 6))) |
| 11× | add-log-exp |
| 6× | add-cube-cbrt |
| 6× | associate-*r* |
| 6× | *-un-lft-identity |
| 6× | add-sqr-sqrt |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | sum-log |
| 4× | pow1 |
| 2× | flip-+ |
| 2× | *-commutative |
| 2× | flip3-+ |
| 2× | +-commutative |
| 1× | associate-+l+ |
| 27.0ms | (+ (+ (pow x 2) (* 1/12 (pow x 4))) (* 1/360 (pow x 6))) |
| 8.0ms | (+ (pow x 2) (* 1/12 (pow x 4))) |
| 3.0ms | (* 1/12 (pow x 4)) |
| 3.0ms | (* 1/360 (pow x 6)) |
| 76.0ms | (+ (pow x 2) (* 1/12 (pow x 4))) |
| 50.0ms | (* 1/360 (pow x 6)) |
| 50.0ms | (+ (+ (pow x 2) (* 1/12 (pow x 4))) (* 1/360 (pow x 6))) |
| 33.0ms | (* 1/12 (pow x 4)) |
| 72.0ms | (* (* (exp (pow x 2)) (exp (* 1/12 (pow x 4)))) (exp (* 1/360 (pow x 6)))) |
| 71.0ms | (* (exp (+ (pow x 2) (* 1/12 (pow x 4)))) (exp (* 1/360 (pow x 6)))) |
| 30.0ms | (+ (pow x 2) (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6)))) |
| 30.0ms | (+ (pow x 2) (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6)))) |
| 30.0ms | (+ (pow x 2) (+ (* 1/12 (pow x 4)) (* 1/360 (pow x 6)))) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0b
Found 4 expressions with local error:
| 29.3b | (log (+ (+ (pow x 2) (* 1/12 (pow x 4))) (* 1/360 (pow x 6)))) |
| 2.8b | (exp (log (+ (+ (pow x 2) (* 1/12 (pow x 4))) (* 1/360 (pow x 6))))) |
| 0.1b | (* 1/12 (pow x 4)) |
| 0.1b | (* 1/360 (pow x 6)) |
| 9× | add-cube-cbrt |
| 9× | *-un-lft-identity |
| 9× | add-sqr-sqrt |
| 6× | associate-*r* |
| 6× | log-prod |
| 6× | pow1 |
| 5× | add-exp-log |
| 4× | add-log-exp |
| 4× | add-cbrt-cube |
| 4× | exp-prod |
| 4× | log-div |
| 3× | exp-sum |
| 2× | flip-+ |
| 2× | *-commutative |
| 2× | log-pow |
| 2× | exp-diff |
| 2× | flip3-+ |
| 1× | rem-exp-log |
| 1× | rem-log-exp |
| 22.0ms | (exp (log (+ (+ (pow x 2) (* 1/12 (pow x 4))) (* 1/360 (pow x 6))))) |
| 16.0ms | (log (+ (+ (pow x 2) (* 1/12 (pow x 4))) (* 1/360 (pow x 6)))) |
| 3.0ms | (* 1/12 (pow x 4)) |
| 3.0ms | (* 1/360 (pow x 6)) |
| 144.0ms | (log (+ (+ (pow x 2) (* 1/12 (pow x 4))) (* 1/360 (pow x 6)))) |
| 49.0ms | (exp (log (+ (+ (pow x 2) (* 1/12 (pow x 4))) (* 1/360 (pow x 6))))) |
| 40.0ms | (* 1/360 (pow x 6)) |
| 32.0ms | (* 1/12 (pow x 4)) |
| 374.0ms | (- (+ (log 1/360) (* 30 (/ 1 (pow x 2)))) (+ (* 6 (log (/ 1 x))) (* 90 (/ 1 (pow x 4))))) |
| 283.0ms | (exp (log (- (* (+ (pow x 2) (* 1/12 (pow x 4))) (+ (pow x 2) (* 1/12 (pow x 4)))) (* (* 1/360 (pow x 6)) (* 1/360 (pow x 6)))))) |
| 282.0ms | (log (- (* (+ (pow x 2) (* 1/12 (pow x 4))) (+ (pow x 2) (* 1/12 (pow x 4)))) (* (* 1/360 (pow x 6)) (* 1/360 (pow x 6))))) |
| 268.0ms | (- (+ (log 1/360) (* 30 (/ 1 (pow x 2)))) (+ (* 6 (log (/ -1 x))) (* 90 (/ 1 (pow x 4))))) |
| 206.0ms | (log (+ (pow (+ (pow x 2) (* 1/12 (pow x 4))) 3) (pow (* 1/360 (pow x 6)) 3))) |
3 alts after pruning (1 fresh and 2 done)
Merged error: 0b
0% (0.6b remaining)
Error of 0.7b against oracle of 0.0b and baseline of 0.7b
| 15917× | (pre true 80) |
| 8086× | (body real 80) |
| 5686× | (body real 1280) |
| 1254× | (body real 640) |
| 589× | (body real 320) |
| 302× | (body real 160) |