


Bits error versus x



Bits error versus y
Results
if x < -0.006392313756824013 or 0.006923448538232147 < x Initial program 0.0
Taylor expanded around -inf 0.0
if -0.006392313756824013 < x < 0.006923448538232147Initial program 58.8
Taylor expanded around -inf 58.8
Taylor expanded around 0 0.0
Final simplification0.0
herbie shell --seed 2019016 +o rules:numerics
(FPCore (x y)
:name "Logistic function from Lakshay Garg"
(- (/ 2 (+ 1 (exp (* -2 x)))) 1))
Time bar (total: 7.5s)Debug log
| 256× | (pre true 80) |
| 141× | (body real 80) |
| 48× | (body real 1280) |
| 38× | (body real 640) |
| 20× | (body real 320) |
| 9× | (body real 160) |
| 7.0ms | (- (/ 2 (+ 1 (exp (* -2 x)))) 1) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 27.3b
Found 2 expressions with local error:
| 3.5b | (- (/ 2 (+ 1 (exp (* -2 x)))) 1) |
| 0.0b | (/ 2 (+ 1 (exp (* -2 x)))) |
| 6× | fma-neg |
| 5× | add-sqr-sqrt |
| 4× | add-cube-cbrt |
| 4× | associate-/r/ |
| 4× | *-un-lft-identity |
| 3× | add-exp-log |
| 3× | associate-/r* |
| 2× | add-log-exp |
| 2× | div-inv |
| 2× | log1p-expm1-u |
| 2× | flip-+ |
| 2× | add-cbrt-cube |
| 2× | flip3-+ |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 1× | flip-- |
| 1× | difference-of-sqr-1 |
| 1× | flip3-- |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 1× | expm1-def |
| 10.0ms | (- (/ 2 (+ 1 (exp (* -2 x)))) 1) |
| 1.0ms | (/ 2 (+ 1 (exp (* -2 x)))) |
| 55.0ms | (- (/ 2 (+ 1 (exp (* -2 x)))) 1) |
| 26.0ms | (/ 2 (+ 1 (exp (* -2 x)))) |
| 117.0ms | (+ (* 1 1) (- (* (exp (* -2 x)) (exp (* -2 x))) (* 1 (exp (* -2 x))))) |
| 97.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 76.0ms | (- (+ x 1) (* 1/3 (pow x 3))) |
| 43.0ms | (- (* 2 (/ 1 (+ (exp (* -2 x)) 1))) 1) |
| 43.0ms | (/ 2 (+ (pow 1 3) (pow (exp (* -2 x)) 3))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0b
Found 2 expressions with local error:
| 3.5b | (- (/ 2 (+ (exp (* -2 x)) 1)) 1) |
| 0.0b | (/ 2 (+ (exp (* -2 x)) 1)) |
| 6× | fma-neg |
| 5× | add-sqr-sqrt |
| 4× | add-cube-cbrt |
| 4× | associate-/r/ |
| 4× | *-un-lft-identity |
| 3× | add-exp-log |
| 3× | associate-/r* |
| 2× | add-log-exp |
| 2× | div-inv |
| 2× | log1p-expm1-u |
| 2× | flip-+ |
| 2× | add-cbrt-cube |
| 2× | flip3-+ |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 1× | flip-- |
| 1× | difference-of-sqr-1 |
| 1× | flip3-- |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 1× | expm1-def |
| 11.0ms | (- (/ 2 (+ (exp (* -2 x)) 1)) 1) |
| 5.0ms | (/ 2 (+ (exp (* -2 x)) 1)) |
| 58.0ms | (- (/ 2 (+ (exp (* -2 x)) 1)) 1) |
| 16.0ms | (/ 2 (+ (exp (* -2 x)) 1)) |
| 147.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 107.0ms | (+ (* (exp (* -2 x)) (exp (* -2 x))) (- (* 1 1) (* (exp (* -2 x)) 1))) |
| 59.0ms | (- (+ x 1) (* 1/3 (pow x 3))) |
| 58.0ms | (/ 2 (- (* (exp (* -2 x)) (exp (* -2 x))) (* 1 1))) |
| 53.0ms | (/ 2 (+ (pow (exp (* -2 x)) 3) (pow 1 3))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0b
Found 3 expressions with local error:
| 21.2b | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 0.3b | (* 1/3 (pow x 3)) |
| 0.1b | (* 2/15 (pow x 5)) |
| 8× | associate-*r* |
| 7× | add-cube-cbrt |
| 7× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 5× | add-log-exp |
| 3× | log1p-expm1-u |
| 3× | add-exp-log |
| 3× | prod-diff |
| 3× | fma-neg |
| 3× | add-cbrt-cube |
| 3× | pow1 |
| 3× | expm1-log1p-u |
| 2× | *-commutative |
| 1× | flip-- |
| 1× | associate--l+ |
| 1× | unpow3 |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | cube-mult |
| 5.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 1.0ms | (* 1/3 (pow x 3)) |
| 1.0ms | (* 2/15 (pow x 5)) |
| 35.0ms | (* 2/15 (pow x 5)) |
| 34.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 16.0ms | (* 1/3 (pow x 3)) |
| 173.0ms | (/ (exp (+ x (* 2/15 (pow x 5)))) (exp (* 1/3 (pow x 3)))) |
| 134.0ms | (fma 1 (+ x (* 2/15 (pow x 5))) (- (* (pow x 3) 1/3))) |
| 122.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 113.0ms | (fma (sqrt (+ x (* 2/15 (pow x 5)))) (sqrt (+ x (* 2/15 (pow x 5)))) (- (* (pow x 3) 1/3))) |
| 110.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.2b
| 8000× | (pre true 80) |
| 4116× | (body real 80) |
| 1682× | (body real 1280) |
| 1264× | (body real 640) |
| 617× | (body real 320) |
| 321× | (body real 160) |