Why not replace q with zero?



On 12/11/08, Viktor T. Toth <vttoth at vttoth.com> wrote:

>  (%i4) sum(i,i,q,n),simpsum;
> Is  q  positive, negative, or zero?
> neg;
>  (%o4) (n^2+n)/2-(q^2+q)/2
>  (%i5) %,q=-5,n=8;
>  (%o5) 26

>  Further, why does simpsum need asksign for this in the first place?
>  Isn't the result given by simpsum for q>0, (n+1-q)*(n+q)/2, actually
>  correct regardless of sign? That is, so long as q<=n?

Agreed, this is all strange. FWIW it appears that this strangeness
arises from FPOLYSUM in src/combin.lisp. Not sure what was
intended there, maybe someone can take a look.

Viktor, if you could make a bug report, that would be very helpful.

best

Robert Dodier