


Bits error versus x



Bits error versus y
if x < -0.007185451780055169 or 0.007491583784597752 < x Initial program 0.0
rmApplied flip3--0.0
rmApplied add-log-exp0.0
Applied add-log-exp0.0
Applied sum-log0.0
Applied add-log-exp0.0
Applied sum-log0.0
Simplified0.0
if -0.007185451780055169 < x < 0.007491583784597752Initial program 59.0
Taylor expanded around 0 0.0
Final simplification0.0
herbie shell --seed 2019022 +o rules:numerics
(FPCore (x y)
:name "Logistic function from Lakshay Garg"
(- (/ 2 (+ 1 (exp (* -2 x)))) 1))
Time bar (total: 2.0m)Debug log
| 33.0ms | 60× | body | 1280 | valid |
| 15.0ms | 37× | body | 640 | valid |
| 12.0ms | 137× | body | 80 | valid |
| 5.0ms | 16× | body | 320 | valid |
| 1.0ms | 6× | body | 160 | valid |
| 7.0ms | (- (/ 2 (+ 1 (exp (* -2 x)))) 1) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 28.1b
Found 1 expressions with local error:
| 1.9b | (- (/ 2 (+ 1 (exp (* -2 x)))) 1) |
| 6× | fma-neg |
| 3× | add-sqr-sqrt |
| 2× | add-cube-cbrt |
| 2× | associate-/r/ |
| 2× | add-exp-log |
| 2× | *-un-lft-identity |
| 1× | add-log-exp |
| 1× | flip-- |
| 1× | div-inv |
| 1× | log1p-expm1-u |
| 1× | flip-+ |
| 1× | difference-of-sqr-1 |
| 1× | add-cbrt-cube |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | expm1-def |
| 1× | pow1 |
| 1× | expm1-log1p-u |
| 5.0ms | (- (/ 2 (+ 1 (exp (* -2 x)))) 1) |
| 43.0ms | (- (/ 2 (+ 1 (exp (* -2 x)))) 1) |
| 95.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 49.0ms | (/ 2 (+ (pow 1 3) (pow (exp (* -2 x)) 3))) |
| 28.0ms | (- (* 2 (/ 1 (+ (exp (* -2 x)) 1))) 1) |
| 24.0ms | (/ 2 (- (* 1 1) (* (exp (* -2 x)) (exp (* -2 x))))) |
| 20.0ms | (- (* 2 (/ 1 (+ (exp (* -2 x)) 1))) 1) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 1.9b | (- (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow 1 3)) |
| 0.0b | (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) |
| 0.0b | (+ (* (/ 2 (+ 1 (exp (* -2 x)))) (/ 2 (+ 1 (exp (* -2 x))))) (+ (* 1 1) (* (/ 2 (+ 1 (exp (* -2 x)))) 1))) |
| 0.0b | (* (/ 2 (+ 1 (exp (* -2 x)))) (/ 2 (+ 1 (exp (* -2 x))))) |
| 85× | prod-diff |
| 49× | add-sqr-sqrt |
| 46× | *-un-lft-identity |
| 43× | add-cube-cbrt |
| 43× | cube-prod |
| 43× | unpow-prod-down |
| 32× | associate-/r/ |
| 25× | cube-mult |
| 24× | unpow3 |
| 20× | flip-+ |
| 20× | flip3-+ |
| 17× | fma-neg |
| 16× | div-inv |
| 11× | add-log-exp |
| 10× | pow1 |
| 7× | add-exp-log |
| 7× | add-cbrt-cube |
| 6× | frac-add |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | difference-of-squares |
| 3× | associate-*r/ |
| 3× | associate-*l/ |
| 3× | sum-log |
| 3× | frac-times |
| 2× | distribute-lft-out-- |
| 1× | rem-cube-cbrt |
| 1× | flip-- |
| 1× | cbrt-unprod |
| 1× | pow-prod-up |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-exp |
| 1× | pow-prod-down |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | pow-plus |
| 1× | fma-def |
| 1× | pow-pow |
| 1× | sub-neg |
| 1× | associate-+r+ |
| 1× | +-commutative |
| 1× | difference-cubes |
| 1× | pow-to-exp |
| 1× | pow2 |
| 1× | cube-div |
| 12.0ms | (- (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow 1 3)) |
| 8.0ms | (+ (* (/ 2 (+ 1 (exp (* -2 x)))) (/ 2 (+ 1 (exp (* -2 x))))) (+ (* 1 1) (* (/ 2 (+ 1 (exp (* -2 x)))) 1))) |
| 4.0ms | (* (/ 2 (+ 1 (exp (* -2 x)))) (/ 2 (+ 1 (exp (* -2 x))))) |
| 1.0ms | (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) |
| 78.0ms | (+ (* (/ 2 (+ 1 (exp (* -2 x)))) (/ 2 (+ 1 (exp (* -2 x))))) (+ (* 1 1) (* (/ 2 (+ 1 (exp (* -2 x)))) 1))) |
| 70.0ms | (- (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow 1 3)) |
| 41.0ms | (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) |
| 31.0ms | (* (/ 2 (+ 1 (exp (* -2 x)))) (/ 2 (+ 1 (exp (* -2 x))))) |
| 972.0ms | (fma 1 (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (- (* (cbrt (pow 1 3)) (* (cbrt (pow 1 3)) (cbrt (pow 1 3)))))) |
| 939.0ms | (fma 1 (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (- (* 1 (* 1 1)))) |
| 906.0ms | (* (* (* (/ 2 (+ 1 (exp (* -2 x)))) (/ 2 (+ 1 (exp (* -2 x))))) (/ 2 (+ 1 (exp (* -2 x))))) (* (* (/ 2 (+ 1 (exp (* -2 x)))) (/ 2 (+ 1 (exp (* -2 x))))) (/ 2 (+ 1 (exp (* -2 x)))))) |
| 861.0ms | (* (+ 1 (exp (* -2 x))) (- (* 1 1) (* (/ 2 (+ 1 (exp (* -2 x)))) 1))) |
| 779.0ms | (* (+ 1 (exp (* -2 x))) (- (* 1 1) (* (/ 2 (+ 1 (exp (* -2 x)))) 1))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 1.9b | (- (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow 1 3)) |
| 0.0b | (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) |
| 0.0b | (/ (- (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow 1 3)) (log (exp (fma (/ 2 (+ 1 (exp (* -2 x)))) (+ (/ 2 (+ 1 (exp (* -2 x)))) 1) 1)))) |
| 0.0b | (+ (/ 2 (+ 1 (exp (* -2 x)))) 1) |
| 124× | add-sqr-sqrt |
| 97× | *-un-lft-identity |
| 85× | prod-diff |
| 70× | add-cube-cbrt |
| 63× | times-frac |
| 51× | cube-prod |
| 51× | unpow-prod-down |
| 40× | log-pow |
| 33× | cube-mult |
| 30× | associate-/r/ |
| 30× | exp-prod |
| 27× | difference-of-squares |
| 24× | unpow3 |
| 18× | distribute-lft-out-- |
| 17× | fma-neg |
| 16× | div-inv |
| 16× | flip-+ |
| 16× | flip3-+ |
| 15× | pow1 |
| 9× | associate-/l* |
| 9× | difference-cubes |
| 7× | add-exp-log |
| 7× | add-cbrt-cube |
| 7× | associate-/r* |
| 6× | add-log-exp |
| 6× | fma-def |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 2× | associate-/l/ |
| 2× | flip-- |
| 2× | flip3-- |
| 1× | rem-cube-cbrt |
| 1× | pow-exp |
| 1× | div-exp |
| 1× | div-sub |
| 1× | diff-log |
| 1× | frac-2neg |
| 1× | pow-pow |
| 1× | sub-neg |
| 1× | clear-num |
| 1× | +-commutative |
| 1× | cbrt-undiv |
| 1× | pow-to-exp |
| 1× | cube-div |
| 46.0ms | (/ (- (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow 1 3)) (log (exp (fma (/ 2 (+ 1 (exp (* -2 x)))) (+ (/ 2 (+ 1 (exp (* -2 x)))) 1) 1)))) |
| 23.0ms | (- (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow 1 3)) |
| 5.0ms | (+ (/ 2 (+ 1 (exp (* -2 x)))) 1) |
| 2.0ms | (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) |
| 144.0ms | (/ (- (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow 1 3)) (log (exp (fma (/ 2 (+ 1 (exp (* -2 x)))) (+ (/ 2 (+ 1 (exp (* -2 x)))) 1) 1)))) |
| 60.0ms | (- (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow 1 3)) |
| 33.0ms | (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) |
| 24.0ms | (+ (/ 2 (+ 1 (exp (* -2 x)))) 1) |
| 995.0ms | (fma (pow (/ 2 (+ (pow 1 3) (pow (exp (* -2 x)) 3))) 3) (pow (+ (* 1 1) (- (* (exp (* -2 x)) (exp (* -2 x))) (* 1 (exp (* -2 x))))) 3) (- (* (cbrt (pow 1 3)) (* (cbrt (pow 1 3)) (cbrt (pow 1 3)))))) |
| 993.0ms | (- (* (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (pow (/ 2 (+ 1 (exp (* -2 x)))) 3)) (* (pow 1 3) (pow 1 3))) |
| 952.0ms | (fma 1 (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (- (* (cbrt (pow 1 3)) (* (cbrt (pow 1 3)) (cbrt (pow 1 3)))))) |
| 900.0ms | (pow (/ 2 (+ (pow 1 3) (pow (exp (* -2 x)) 3))) 3) |
| 731.0ms | (fma 1 (pow (/ 2 (+ 1 (exp (* -2 x)))) 3) (- (* 1 (* 1 1)))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0b
Found 4 expressions with local error:
| 19.1b | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 0.2b | (* 2/15 (pow x 5)) |
| 0.1b | (* 1/3 (pow x 3)) |
| 0.0b | (+ x (* 2/15 (pow x 5))) |
| 8× | add-cube-cbrt |
| 8× | associate-*r* |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | prod-diff |
| 3× | fma-neg |
| 2× | *-commutative |
| 1× | flip-- |
| 1× | flip-+ |
| 1× | associate--l+ |
| 1× | unpow3 |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | +-commutative |
| 1× | cube-mult |
| 10.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 2.0ms | (* 1/3 (pow x 3)) |
| 2.0ms | (* 2/15 (pow x 5)) |
| 2.0ms | (+ x (* 2/15 (pow x 5))) |
| 47.0ms | (+ x (* 2/15 (pow x 5))) |
| 31.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 19.0ms | (* 2/15 (pow x 5)) |
| 15.0ms | (* 1/3 (pow x 3)) |
| 144.0ms | (/ (exp (+ x (* 2/15 (pow x 5)))) (exp (* 1/3 (pow x 3)))) |
| 140.0ms | (fma (sqrt (+ x (* 2/15 (pow x 5)))) (sqrt (+ x (* 2/15 (pow x 5)))) (- (* (pow x 3) 1/3))) |
| 123.0ms | (fma 1 (+ x (* 2/15 (pow x 5))) (- (* (pow x 3) 1/3))) |
| 121.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 88.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
2 alts after pruning (0 fresh and 2 done)
Merged error: 0b
100% (0.0b remaining)
Error of 0.0b against oracle of 0.0b and baseline of 29.5b
| 1.5s | 1714× | body | 1280 | valid |
| 568.0ms | 1261× | body | 640 | valid |
| 376.0ms | 4078× | body | 80 | valid |
| 235.0ms | 639× | body | 320 | valid |
| 57.0ms | 308× | body | 160 | valid |