Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Close
From: <noreply@so...>  20021126 19:16:11

Bugs item #625278, was opened at 20021018 15:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Category: Lisp Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  Comment By: Martin Rubey (kratt5) Date: 20021126 19:16 Message: Logged In: YES user_id=651552 sorry, below was a typo (a parenthesis didn't get deleted) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 19:04 Message: Logged In: YES user_id=651552 > Can you explain why there is a conditionalization > for #+cl there? I don't see any reason for this > code to depend on common lisp or not. My thought > on fixing the code previously displayed was to > just remove #cl > RJF Yes, I can explain it. It's there because I was very stupid. Here is the right fix: (and THANK YOU, I feel a little ashamed...) diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n) (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 13:49 Message: Logged In: YES user_id=651552 OK, I got the bug now: The fix is rather obvious (except that I had to dig through all of sum, see below) and the bug is rather serious (I can produce lots of everyday examples, (C1) sum(f(k)+1,k,1,n),simpsum; (D2) n so I propose to include it in 5.9.0 !!! I didn't change some things I would like to, I think this is for after 5.9.0... fix and explanation below Martin fix diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 930,939d923 < ; this is to deal with linearity Kratt5, 26.11.2002 < ((let (*a *n (var *var*)) < (cond ((prog2 (m2 e '((mtimes) ((coefftt) (var* (set) *a freevar)) < ((coefftt) (var* (set) *n true))) < nil) < (not (equal *a 1))) < ;; we have to return T, so that sum is exited if the test was successful < (prog2 (sum *n (list '(mtimes) y *a)) < T))))) < ;; 943,944c927 < #+cl (adusum (list '(mtimes) e y)) ;; Kratt5 26.11.2002 < ;; nil  > nil end fix I tested it with Maxima version: 5.9.0rc3 Maxima build date: 13:52 11/18/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 explanation  (lisp level) the structure of $sum is roughly as follows: $sum: argcheck, call dosum with meval'd bounds dosum: didn't look at this too much after this, meval calls simpsum **** if you type 'sum(f(k),k,1,n),simpsum; meval calls only simpsum **** $simpsum: call simpsum1 simpsum1: checks lo=hi, otherwise exp not depending on the summation index, otherwise if $simpsum, call simpsum2 **** simpsum2 is found in combin.lisp **** simpsum2: sets up a variable *plus, which will contain all the stuff which is added together at the end calls sumsum sumsum: returns the part of the expression it was able to sum up (this is the contents of the variable "usum"), all the rest (the contents of the variable "sum") is put into the variable *plus, which is then used by simpsum2 calls sum sum: adsum's and adusum's the sum of e. It's result is discarded. (at least I think that this function is only called by sumsum, but there are lots of places where a variable is called "sum"...)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 
From: <noreply@so...>  20021018 15:18:24

Bugs item #625278, was opened at 20021018 08:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Category: Lisp Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 
From: <noreply@so...>  20021126 13:49:23

Bugs item #625278, was opened at 20021018 15:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Category: Lisp Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  Comment By: Martin Rubey (kratt5) Date: 20021126 13:49 Message: Logged In: YES user_id=651552 OK, I got the bug now: The fix is rather obvious (except that I had to dig through all of sum, see below) and the bug is rather serious (I can produce lots of everyday examples, (C1) sum(f(k)+1,k,1,n),simpsum; (D2) n so I propose to include it in 5.9.0 !!! I didn't change some things I would like to, I think this is for after 5.9.0... fix and explanation below Martin fix diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 930,939d923 < ; this is to deal with linearity Kratt5, 26.11.2002 < ((let (*a *n (var *var*)) < (cond ((prog2 (m2 e '((mtimes) ((coefftt) (var* (set) *a freevar)) < ((coefftt) (var* (set) *n true))) < nil) < (not (equal *a 1))) < ;; we have to return T, so that sum is exited if the test was successful < (prog2 (sum *n (list '(mtimes) y *a)) < T))))) < ;; 943,944c927 < #+cl (adusum (list '(mtimes) e y)) ;; Kratt5 26.11.2002 < ;; nil  > nil end fix I tested it with Maxima version: 5.9.0rc3 Maxima build date: 13:52 11/18/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 explanation  (lisp level) the structure of $sum is roughly as follows: $sum: argcheck, call dosum with meval'd bounds dosum: didn't look at this too much after this, meval calls simpsum **** if you type 'sum(f(k),k,1,n),simpsum; meval calls only simpsum **** $simpsum: call simpsum1 simpsum1: checks lo=hi, otherwise exp not depending on the summation index, otherwise if $simpsum, call simpsum2 **** simpsum2 is found in combin.lisp **** simpsum2: sets up a variable *plus, which will contain all the stuff which is added together at the end calls sumsum sumsum: returns the part of the expression it was able to sum up (this is the contents of the variable "usum"), all the rest (the contents of the variable "sum") is put into the variable *plus, which is then used by simpsum2 calls sum sum: adsum's and adusum's the sum of e. It's result is discarded. (at least I think that this function is only called by sumsum, but there are lots of places where a variable is called "sum"...)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 
From: <noreply@so...>  20021126 19:04:43

Bugs item #625278, was opened at 20021018 15:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Category: Lisp Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  Comment By: Martin Rubey (kratt5) Date: 20021126 19:04 Message: Logged In: YES user_id=651552 > Can you explain why there is a conditionalization > for #+cl there? I don't see any reason for this > code to depend on common lisp or not. My thought > on fixing the code previously displayed was to > just remove #cl > RJF Yes, I can explain it. It's there because I was very stupid. Here is the right fix: (and THANK YOU, I feel a little ashamed...) diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n) (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 13:49 Message: Logged In: YES user_id=651552 OK, I got the bug now: The fix is rather obvious (except that I had to dig through all of sum, see below) and the bug is rather serious (I can produce lots of everyday examples, (C1) sum(f(k)+1,k,1,n),simpsum; (D2) n so I propose to include it in 5.9.0 !!! I didn't change some things I would like to, I think this is for after 5.9.0... fix and explanation below Martin fix diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 930,939d923 < ; this is to deal with linearity Kratt5, 26.11.2002 < ((let (*a *n (var *var*)) < (cond ((prog2 (m2 e '((mtimes) ((coefftt) (var* (set) *a freevar)) < ((coefftt) (var* (set) *n true))) < nil) < (not (equal *a 1))) < ;; we have to return T, so that sum is exited if the test was successful < (prog2 (sum *n (list '(mtimes) y *a)) < T))))) < ;; 943,944c927 < #+cl (adusum (list '(mtimes) e y)) ;; Kratt5 26.11.2002 < ;; nil  > nil end fix I tested it with Maxima version: 5.9.0rc3 Maxima build date: 13:52 11/18/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 explanation  (lisp level) the structure of $sum is roughly as follows: $sum: argcheck, call dosum with meval'd bounds dosum: didn't look at this too much after this, meval calls simpsum **** if you type 'sum(f(k),k,1,n),simpsum; meval calls only simpsum **** $simpsum: call simpsum1 simpsum1: checks lo=hi, otherwise exp not depending on the summation index, otherwise if $simpsum, call simpsum2 **** simpsum2 is found in combin.lisp **** simpsum2: sets up a variable *plus, which will contain all the stuff which is added together at the end calls sumsum sumsum: returns the part of the expression it was able to sum up (this is the contents of the variable "usum"), all the rest (the contents of the variable "sum") is put into the variable *plus, which is then used by simpsum2 calls sum sum: adsum's and adusum's the sum of e. It's result is discarded. (at least I think that this function is only called by sumsum, but there are lots of places where a variable is called "sum"...)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 
From: <noreply@so...>  20021126 19:16:11

Bugs item #625278, was opened at 20021018 15:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Category: Lisp Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  Comment By: Martin Rubey (kratt5) Date: 20021126 19:16 Message: Logged In: YES user_id=651552 sorry, below was a typo (a parenthesis didn't get deleted) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 19:04 Message: Logged In: YES user_id=651552 > Can you explain why there is a conditionalization > for #+cl there? I don't see any reason for this > code to depend on common lisp or not. My thought > on fixing the code previously displayed was to > just remove #cl > RJF Yes, I can explain it. It's there because I was very stupid. Here is the right fix: (and THANK YOU, I feel a little ashamed...) diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n) (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 13:49 Message: Logged In: YES user_id=651552 OK, I got the bug now: The fix is rather obvious (except that I had to dig through all of sum, see below) and the bug is rather serious (I can produce lots of everyday examples, (C1) sum(f(k)+1,k,1,n),simpsum; (D2) n so I propose to include it in 5.9.0 !!! I didn't change some things I would like to, I think this is for after 5.9.0... fix and explanation below Martin fix diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 930,939d923 < ; this is to deal with linearity Kratt5, 26.11.2002 < ((let (*a *n (var *var*)) < (cond ((prog2 (m2 e '((mtimes) ((coefftt) (var* (set) *a freevar)) < ((coefftt) (var* (set) *n true))) < nil) < (not (equal *a 1))) < ;; we have to return T, so that sum is exited if the test was successful < (prog2 (sum *n (list '(mtimes) y *a)) < T))))) < ;; 943,944c927 < #+cl (adusum (list '(mtimes) e y)) ;; Kratt5 26.11.2002 < ;; nil  > nil end fix I tested it with Maxima version: 5.9.0rc3 Maxima build date: 13:52 11/18/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 explanation  (lisp level) the structure of $sum is roughly as follows: $sum: argcheck, call dosum with meval'd bounds dosum: didn't look at this too much after this, meval calls simpsum **** if you type 'sum(f(k),k,1,n),simpsum; meval calls only simpsum **** $simpsum: call simpsum1 simpsum1: checks lo=hi, otherwise exp not depending on the summation index, otherwise if $simpsum, call simpsum2 **** simpsum2 is found in combin.lisp **** simpsum2: sets up a variable *plus, which will contain all the stuff which is added together at the end calls sumsum sumsum: returns the part of the expression it was able to sum up (this is the contents of the variable "usum"), all the rest (the contents of the variable "sum") is put into the variable *plus, which is then used by simpsum2 calls sum sum: adsum's and adusum's the sum of e. It's result is discarded. (at least I think that this function is only called by sumsum, but there are lots of places where a variable is called "sum"...)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 
From: SourceForge.net <noreply@so...>  20040224 05:14:24

Bugs item #625278, was opened at 20021018 11:18 Message generated for change (Comment added) made by macrakis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Category: Lisp Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  >Comment By: Stavros Macrakis (macrakis) Date: 20040224 00:04 Message: Logged In: YES user_id=588346 Thanks for the patch. You might also be interested to know that nusum does very nicely on this case (generalized) with a little massaging: summand: binomial(q,2k)binomial(q,1k); sum0: nusum( minfactorial(makefact(summand)), k,1,n); factcomb(minfactorial(sum0)) => qq!/((1n)!*(q+n1)!) For more fun, try summand: binomial(q,7k)binomial(q,3k); PS Could you please post the complete patched 'sum' function? I am more confident with that than with merged patches. Thanks.  Comment By: Martin Rubey (kratt5) Date: 20021126 14:16 Message: Logged In: YES user_id=651552 sorry, below was a typo (a parenthesis didn't get deleted) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 14:04 Message: Logged In: YES user_id=651552 > Can you explain why there is a conditionalization > for #+cl there? I don't see any reason for this > code to depend on common lisp or not. My thought > on fixing the code previously displayed was to > just remove #cl > RJF Yes, I can explain it. It's there because I was very stupid. Here is the right fix: (and THANK YOU, I feel a little ashamed...) diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n) (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 08:49 Message: Logged In: YES user_id=651552 OK, I got the bug now: The fix is rather obvious (except that I had to dig through all of sum, see below) and the bug is rather serious (I can produce lots of everyday examples, (C1) sum(f(k)+1,k,1,n),simpsum; (D2) n so I propose to include it in 5.9.0 !!! I didn't change some things I would like to, I think this is for after 5.9.0... fix and explanation below Martin fix diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 930,939d923 < ; this is to deal with linearity Kratt5, 26.11.2002 < ((let (*a *n (var *var*)) < (cond ((prog2 (m2 e '((mtimes) ((coefftt) (var* (set) *a freevar)) < ((coefftt) (var* (set) *n true))) < nil) < (not (equal *a 1))) < ;; we have to return T, so that sum is exited if the test was successful < (prog2 (sum *n (list '(mtimes) y *a)) < T))))) < ;; 943,944c927 < #+cl (adusum (list '(mtimes) e y)) ;; Kratt5 26.11.2002 < ;; nil  > nil end fix I tested it with Maxima version: 5.9.0rc3 Maxima build date: 13:52 11/18/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 explanation  (lisp level) the structure of $sum is roughly as follows: $sum: argcheck, call dosum with meval'd bounds dosum: didn't look at this too much after this, meval calls simpsum **** if you type 'sum(f(k),k,1,n),simpsum; meval calls only simpsum **** $simpsum: call simpsum1 simpsum1: checks lo=hi, otherwise exp not depending on the summation index, otherwise if $simpsum, call simpsum2 **** simpsum2 is found in combin.lisp **** simpsum2: sets up a variable *plus, which will contain all the stuff which is added together at the end calls sumsum sumsum: returns the part of the expression it was able to sum up (this is the contents of the variable "usum"), all the rest (the contents of the variable "sum") is put into the variable *plus, which is then used by simpsum2 calls sum sum: adsum's and adusum's the sum of e. It's result is discarded. (at least I think that this function is only called by sumsum, but there are lots of places where a variable is called "sum"...)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 
From: SourceForge.net <noreply@so...>  20051124 08:39:45

Bugs item #625278, was opened at 20021018 09:18 Message generated for change (Settings changed) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  Comment By: Stavros Macrakis (macrakis) Date: 20040223 22:04 Message: Logged In: YES user_id=588346 Thanks for the patch. You might also be interested to know that nusum does very nicely on this case (generalized) with a little massaging: summand: binomial(q,2k)binomial(q,1k); sum0: nusum( minfactorial(makefact(summand)), k,1,n); factcomb(minfactorial(sum0)) => qq!/((1n)!*(q+n1)!) For more fun, try summand: binomial(q,7k)binomial(q,3k); PS Could you please post the complete patched 'sum' function? I am more confident with that than with merged patches. Thanks.  Comment By: Martin Rubey (kratt5) Date: 20021126 12:16 Message: Logged In: YES user_id=651552 sorry, below was a typo (a parenthesis didn't get deleted) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 12:04 Message: Logged In: YES user_id=651552 > Can you explain why there is a conditionalization > for #+cl there? I don't see any reason for this > code to depend on common lisp or not. My thought > on fixing the code previously displayed was to > just remove #cl > RJF Yes, I can explain it. It's there because I was very stupid. Here is the right fix: (and THANK YOU, I feel a little ashamed...) diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n) (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 06:49 Message: Logged In: YES user_id=651552 OK, I got the bug now: The fix is rather obvious (except that I had to dig through all of sum, see below) and the bug is rather serious (I can produce lots of everyday examples, (C1) sum(f(k)+1,k,1,n),simpsum; (D2) n so I propose to include it in 5.9.0 !!! I didn't change some things I would like to, I think this is for after 5.9.0... fix and explanation below Martin fix diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 930,939d923 < ; this is to deal with linearity Kratt5, 26.11.2002 < ((let (*a *n (var *var*)) < (cond ((prog2 (m2 e '((mtimes) ((coefftt) (var* (set) *a freevar)) < ((coefftt) (var* (set) *n true))) < nil) < (not (equal *a 1))) < ;; we have to return T, so that sum is exited if the test was successful < (prog2 (sum *n (list '(mtimes) y *a)) < T))))) < ;; 943,944c927 < #+cl (adusum (list '(mtimes) e y)) ;; Kratt5 26.11.2002 < ;; nil  > nil end fix I tested it with Maxima version: 5.9.0rc3 Maxima build date: 13:52 11/18/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 explanation  (lisp level) the structure of $sum is roughly as follows: $sum: argcheck, call dosum with meval'd bounds dosum: didn't look at this too much after this, meval calls simpsum **** if you type 'sum(f(k),k,1,n),simpsum; meval calls only simpsum **** $simpsum: call simpsum1 simpsum1: checks lo=hi, otherwise exp not depending on the summation index, otherwise if $simpsum, call simpsum2 **** simpsum2 is found in combin.lisp **** simpsum2: sets up a variable *plus, which will contain all the stuff which is added together at the end calls sumsum sumsum: returns the part of the expression it was able to sum up (this is the contents of the variable "usum"), all the rest (the contents of the variable "sum") is put into the variable *plus, which is then used by simpsum2 calls sum sum: adsum's and adusum's the sum of e. It's result is discarded. (at least I think that this function is only called by sumsum, but there are lots of places where a variable is called "sum"...)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 
From: SourceForge.net <noreply@so...>  20051124 08:43:07

Bugs item #625278, was opened at 20021018 09:18 Message generated for change (Comment added) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core Group: None Status: Closed Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  Comment By: Robert Dodier (robert_dodier) Date: 20051124 01:43 Message: Logged In: YES user_id=501686 The reported bug is not present in the current cvs version of Maxima. Thank you for your report. If you see this bug in a later version of Maxima, please submit a new bug report.  Comment By: Stavros Macrakis (macrakis) Date: 20040223 22:04 Message: Logged In: YES user_id=588346 Thanks for the patch. You might also be interested to know that nusum does very nicely on this case (generalized) with a little massaging: summand: binomial(q,2k)binomial(q,1k); sum0: nusum( minfactorial(makefact(summand)), k,1,n); factcomb(minfactorial(sum0)) => qq!/((1n)!*(q+n1)!) For more fun, try summand: binomial(q,7k)binomial(q,3k); PS Could you please post the complete patched 'sum' function? I am more confident with that than with merged patches. Thanks.  Comment By: Martin Rubey (kratt5) Date: 20021126 12:16 Message: Logged In: YES user_id=651552 sorry, below was a typo (a parenthesis didn't get deleted) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 12:04 Message: Logged In: YES user_id=651552 > Can you explain why there is a conditionalization > for #+cl there? I don't see any reason for this > code to depend on common lisp or not. My thought > on fixing the code previously displayed was to > just remove #cl > RJF Yes, I can explain it. It's there because I was very stupid. Here is the right fix: (and THANK YOU, I feel a little ashamed...) diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n) (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 06:49 Message: Logged In: YES user_id=651552 OK, I got the bug now: The fix is rather obvious (except that I had to dig through all of sum, see below) and the bug is rather serious (I can produce lots of everyday examples, (C1) sum(f(k)+1,k,1,n),simpsum; (D2) n so I propose to include it in 5.9.0 !!! I didn't change some things I would like to, I think this is for after 5.9.0... fix and explanation below Martin fix diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 930,939d923 < ; this is to deal with linearity Kratt5, 26.11.2002 < ((let (*a *n (var *var*)) < (cond ((prog2 (m2 e '((mtimes) ((coefftt) (var* (set) *a freevar)) < ((coefftt) (var* (set) *n true))) < nil) < (not (equal *a 1))) < ;; we have to return T, so that sum is exited if the test was successful < (prog2 (sum *n (list '(mtimes) y *a)) < T))))) < ;; 943,944c927 < #+cl (adusum (list '(mtimes) e y)) ;; Kratt5 26.11.2002 < ;; nil  > nil end fix I tested it with Maxima version: 5.9.0rc3 Maxima build date: 13:52 11/18/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 explanation  (lisp level) the structure of $sum is roughly as follows: $sum: argcheck, call dosum with meval'd bounds dosum: didn't look at this too much after this, meval calls simpsum **** if you type 'sum(f(k),k,1,n),simpsum; meval calls only simpsum **** $simpsum: call simpsum1 simpsum1: checks lo=hi, otherwise exp not depending on the summation index, otherwise if $simpsum, call simpsum2 **** simpsum2 is found in combin.lisp **** simpsum2: sets up a variable *plus, which will contain all the stuff which is added together at the end calls sumsum sumsum: returns the part of the expression it was able to sum up (this is the contents of the variable "usum"), all the rest (the contents of the variable "sum") is put into the variable *plus, which is then used by simpsum2 calls sum sum: adsum's and adusum's the sum of e. It's result is discarded. (at least I think that this function is only called by sumsum, but there are lots of places where a variable is called "sum"...)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 
From: SourceForge.net <noreply@so...>  20051125 15:51:25

Bugs item #625278, was opened at 20021018 09:18 Message generated for change (Comment added) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core Group: None >Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Robert Dodier (robert_dodier) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  >Comment By: Robert Dodier (robert_dodier) Date: 20051125 08:51 Message: Logged In: YES user_id=501686 Reopening this report because the example shown below (sum(f(k)+1,k,1,n),simpsum;) is still present. Not clear to me whether any of the patches shown below was ever applied.  Comment By: Robert Dodier (robert_dodier) Date: 20051124 01:43 Message: Logged In: YES user_id=501686 The reported bug is not present in the current cvs version of Maxima. Thank you for your report. If you see this bug in a later version of Maxima, please submit a new bug report.  Comment By: Stavros Macrakis (macrakis) Date: 20040223 22:04 Message: Logged In: YES user_id=588346 Thanks for the patch. You might also be interested to know that nusum does very nicely on this case (generalized) with a little massaging: summand: binomial(q,2k)binomial(q,1k); sum0: nusum( minfactorial(makefact(summand)), k,1,n); factcomb(minfactorial(sum0)) => qq!/((1n)!*(q+n1)!) For more fun, try summand: binomial(q,7k)binomial(q,3k); PS Could you please post the complete patched 'sum' function? I am more confident with that than with merged patches. Thanks.  Comment By: Martin Rubey (kratt5) Date: 20021126 12:16 Message: Logged In: YES user_id=651552 sorry, below was a typo (a parenthesis didn't get deleted) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 12:04 Message: Logged In: YES user_id=651552 > Can you explain why there is a conditionalization > for #+cl there? I don't see any reason for this > code to depend on common lisp or not. My thought > on fixing the code previously displayed was to > just remove #cl > RJF Yes, I can explain it. It's there because I was very stupid. Here is the right fix: (and THANK YOU, I feel a little ashamed...) diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n) (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 06:49 Message: Logged In: YES user_id=651552 OK, I got the bug now: The fix is rather obvious (except that I had to dig through all of sum, see below) and the bug is rather serious (I can produce lots of everyday examples, (C1) sum(f(k)+1,k,1,n),simpsum; (D2) n so I propose to include it in 5.9.0 !!! I didn't change some things I would like to, I think this is for after 5.9.0... fix and explanation below Martin fix diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 930,939d923 < ; this is to deal with linearity Kratt5, 26.11.2002 < ((let (*a *n (var *var*)) < (cond ((prog2 (m2 e '((mtimes) ((coefftt) (var* (set) *a freevar)) < ((coefftt) (var* (set) *n true))) < nil) < (not (equal *a 1))) < ;; we have to return T, so that sum is exited if the test was successful < (prog2 (sum *n (list '(mtimes) y *a)) < T))))) < ;; 943,944c927 < #+cl (adusum (list '(mtimes) e y)) ;; Kratt5 26.11.2002 < ;; nil  > nil end fix I tested it with Maxima version: 5.9.0rc3 Maxima build date: 13:52 11/18/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 explanation  (lisp level) the structure of $sum is roughly as follows: $sum: argcheck, call dosum with meval'd bounds dosum: didn't look at this too much after this, meval calls simpsum **** if you type 'sum(f(k),k,1,n),simpsum; meval calls only simpsum **** $simpsum: call simpsum1 simpsum1: checks lo=hi, otherwise exp not depending on the summation index, otherwise if $simpsum, call simpsum2 **** simpsum2 is found in combin.lisp **** simpsum2: sets up a variable *plus, which will contain all the stuff which is added together at the end calls sumsum sumsum: returns the part of the expression it was able to sum up (this is the contents of the variable "usum"), all the rest (the contents of the variable "sum") is put into the variable *plus, which is then used by simpsum2 calls sum sum: adsum's and adusum's the sum of e. It's result is discarded. (at least I think that this function is only called by sumsum, but there are lots of places where a variable is called "sum"...)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 
From: SourceForge.net <noreply@so...>  20051202 06:34:18

Bugs item #625278, was opened at 20021018 09:18 Message generated for change (Comment added) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Robert Dodier (robert_dodier) Summary: simpsum bug Initial Comment: Hi! Unfortunately I have found a bug in simpsum (it seems): (C1) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),simpsum; (D1) 3 ***************** wrong ********************** (C2) 'SUM(BINOMIAL(2,2k)BINOMIAL(2,1k),k,1,2),sum; (D2) 2 ***************** correct ******************** ***************** however : ****************** (C3) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),simpsum; (D3) x (C4) 'SUM(BINOMIAL(x,2k)BINOMIAL(x,1k),k,1,2),sum; (D4) x (C5) bug_report(); Maxima version: 5.9.0rc1 Maxima build date: 11:40 9/3/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 Martin  >Comment By: Robert Dodier (robert_dodier) Date: 20051201 23:34 Message: Logged In: YES user_id=501686 sum(f(k)+1,k,1,n),simpsum; => n+'sum(f(k),k,1,n) now, due to r1.10 src/combin.lisp. (need to call ADUSUM in SUM to add up parts of summand which depend on summation index.) I wasn't able to decipher the patches stated below, so I figured out a different patch, which works for the examples which I added to tests/rtestsum.mac. Closing this bug as fixed.  Comment By: Robert Dodier (robert_dodier) Date: 20051125 08:51 Message: Logged In: YES user_id=501686 Reopening this report because the example shown below (sum(f(k)+1,k,1,n),simpsum;) is still present. Not clear to me whether any of the patches shown below was ever applied.  Comment By: Robert Dodier (robert_dodier) Date: 20051124 01:43 Message: Logged In: YES user_id=501686 The reported bug is not present in the current cvs version of Maxima. Thank you for your report. If you see this bug in a later version of Maxima, please submit a new bug report.  Comment By: Stavros Macrakis (macrakis) Date: 20040223 22:04 Message: Logged In: YES user_id=588346 Thanks for the patch. You might also be interested to know that nusum does very nicely on this case (generalized) with a little massaging: summand: binomial(q,2k)binomial(q,1k); sum0: nusum( minfactorial(makefact(summand)), k,1,n); factcomb(minfactorial(sum0)) => qq!/((1n)!*(q+n1)!) For more fun, try summand: binomial(q,7k)binomial(q,3k); PS Could you please post the complete patched 'sum' function? I am more confident with that than with merged patches. Thanks.  Comment By: Martin Rubey (kratt5) Date: 20021126 12:16 Message: Logged In: YES user_id=651552 sorry, below was a typo (a parenthesis didn't get deleted) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 12:04 Message: Logged In: YES user_id=651552 > Can you explain why there is a conditionalization > for #+cl there? I don't see any reason for this > code to depend on common lisp or not. My thought > on fixing the code previously displayed was to > just remove #cl > RJF Yes, I can explain it. It's there because I was very stupid. Here is the right fix: (and THANK YOU, I feel a little ashamed...) diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 933,935c927,929 < ;; nil ;; Kratt5 26.11.2002 < ; #cl < (let (*a *n) (var *var*)) ; freevar expects "var", not "*var*"  > nil > #cl > (let (*a *n)  Comment By: Martin Rubey (kratt5) Date: 20021126 06:49 Message: Logged In: YES user_id=651552 OK, I got the bug now: The fix is rather obvious (except that I had to dig through all of sum, see below) and the bug is rather serious (I can produce lots of everyday examples, (C1) sum(f(k)+1,k,1,n),simpsum; (D2) n so I propose to include it in 5.9.0 !!! I didn't change some things I would like to, I think this is for after 5.9.0... fix and explanation below Martin fix diff combin.lisp combin.lisp.~1.2.~ 915,920d914 < ; Kratt5, 26.11.2002 < ; adsum's and adusum's the sum of e. < < ; It's result is discarded. (at least I think that this function is < ; only called by sumsum, but there are lots of places where a variable < ; is called "sum"...) 930,939d923 < ; this is to deal with linearity Kratt5, 26.11.2002 < ((let (*a *n (var *var*)) < (cond ((prog2 (m2 e '((mtimes) ((coefftt) (var* (set) *a freevar)) < ((coefftt) (var* (set) *n true))) < nil) < (not (equal *a 1))) < ;; we have to return T, so that sum is exited if the test was successful < (prog2 (sum *n (list '(mtimes) y *a)) < T))))) < ;; 943,944c927 < #+cl (adusum (list '(mtimes) e y)) ;; Kratt5 26.11.2002 < ;; nil  > nil end fix I tested it with Maxima version: 5.9.0rc3 Maxima build date: 13:52 11/18/2002 host type: i686pclinuxgnu lispimplementationtype: Kyoto Common Lisp lispimplementationversion: GCL25.0 explanation  (lisp level) the structure of $sum is roughly as follows: $sum: argcheck, call dosum with meval'd bounds dosum: didn't look at this too much after this, meval calls simpsum **** if you type 'sum(f(k),k,1,n),simpsum; meval calls only simpsum **** $simpsum: call simpsum1 simpsum1: checks lo=hi, otherwise exp not depending on the summation index, otherwise if $simpsum, call simpsum2 **** simpsum2 is found in combin.lisp **** simpsum2: sets up a variable *plus, which will contain all the stuff which is added together at the end calls sumsum sumsum: returns the part of the expression it was able to sum up (this is the contents of the variable "usum"), all the rest (the contents of the variable "sum") is put into the variable *plus, which is then used by simpsum2 calls sum sum: adsum's and adusum's the sum of e. It's result is discarded. (at least I think that this function is only called by sumsum, but there are lots of places where a variable is called "sum"...)  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=625278&group_id=4933 