Question: int is not equal to add - why ?

I noticed that if I use add instead on using an integral int I dont get the same value. why ??

restart:
E := 7:   p := .5:
add(p^n*2^(n-1), n = 1 .. E)-p^E*add(2^(n-1), n = 1 .. E);
evalf(int(p^n*2^(n-1), n = 1 .. E)-p^E*(int(2^(n-1), n = 1 .. E)), 5);
 
                                  2.5078
                                  2.2899
 

Please Wait...