The following gives an incorrect result:
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.
Log in to post a comment.