#1543 simpsum yields incorrect results

closed
nobody
7
2008-12-13
2008-12-13
Viktor Toth
No

The following gives an incorrect result:

sum(i,i,q,n),simpsum;

First, it invokes asksign for q, which is unnecessary. Second, if the user specifies q as negative, the result given is, (n^2+n)/2-(q^2+q)/2, which is incorrect (the correct result is the same that is given when q>=0, as can be verified by hand.)

Robert Dodier suggests that the problem may be due to some strangeness in polysum, which is defined in combin.lisp.

As in this case, a mathematically incorrect result is produced, I mark this error with a high priority.

Discussion

  • Andrej Vodopivec

    Fixed in combin.lisp r1.32.

    Andrej

     
  • Andrej Vodopivec

    • status: open --> closed
     

Log in to post a comment.