From: SourceForge.net <no...@so...> - 2008-09-16 01:48:59
|
Bugs item #2113751, was opened at 2008-09-16 17:48 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2113751&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Satoshi Adachi (satoshi_adachi) Assigned to: Nobody/Anonymous (nobody) Summary: Incomprehensible behavior of coeff(). Initial Comment: Dear Developers of Maxima, I met an incomprehensible behavior of coeff(). This is an example program for demonstration: ------------------------------------------------------------------------------ /* * incomprehensible_behavior_of_coeff.maxima: * * S.Adachi 2008/09/13 */ display2d:false; comprehensible_1_0:coeff(%e^x, x, 0); INCOMPREHENSIBLE_2_0:coeff(2*%e^x, x, 0); INCOMPREHENSIBLE_3_0:coeff(3*%e^x, x, 0); comprehensible_1_1:coeff(x*%e^x, x, 1); comprehensible_2_1:coeff(2*x*%e^x, x, 1); comprehensible_3_1:coeff(3*x*%e^x, x, 1); comprehensible_1_2:coeff(x^2*%e^x, x, 2); comprehensible_2_2:coeff(2*x^2*%e^x, x, 2); comprehensible_3_2:coeff(3*x^2*%e^x, x, 2); /* END */ ------------------------------------------------------------------------------ The result of execution is as follows: ------------------------------------------------------------------------------ Maxima 5.14.0cvs http://maxima.sourceforge.net Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) batch(incomprehensible_behavihor_of_coeff.maxima) batching #p/Volumes/HFS+2/home/adachi/work/306/incomprehensible_behavihor_of_coeff.maxima (%i2) display2d : false (%o2) false (%i3) comprehensible_1_0:coeff(%e^x,x,0) (%o3) %e^x (%i4) INCOMPREHENSIBLE_2_0:coeff(2*%e^x,x,0) (%o4) 0 (%i5) INCOMPREHENSIBLE_3_0:coeff(3*%e^x,x,0) (%o5) 0 (%i6) comprehensible_1_1:coeff(x*%e^x,x,1) (%o6) %e^x (%i7) comprehensible_2_1:coeff(2*x*%e^x,x,1) (%o7) 2*%e^x (%i8) comprehensible_3_1:coeff(3*x*%e^x,x,1) (%o8) 3*%e^x (%i9) comprehensible_1_2:coeff(x^2*%e^x,x,2) (%o9) %e^x (%i10) comprehensible_2_2:coeff(2*x^2*%e^x,x,2) (%o10) 2*%e^x (%i11) comprehensible_3_2:coeff(3*x^2*%e^x,x,2) (%o11) 3*%e^x (%o12) "incomprehensible_behavihor_of_coeff.maxima" ------------------------------------------------------------------------------ By seeing the results at other lines, I expect that coeff(2*%e^x,x,0) is calculated to be 2*%e^x and coeff(3*%e^x,x,0) is calculated to be 3*%e^x. However, they are not in actuality. This phenomenon may be a bug of coeff(). Or it may be a part of ``specification'' of coeff(). I cannot judge which is the case. If someone can access some old version of Maxima, which is old enough, he or she can run the above example program by using the old Maxima to get the result by that version of Maxima to compare the result with my result. This may help to judge whether this phenomenon is a bug or a part of specification of coeff(). If this phenomenon is a bug of coeff(), plase fix it. Since this phenomenon of coeff() exists, I had to put an ugly fragment of code in my Maxima program for the workaround. Sincerely yours, Satoshi Adachi ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2113751&group_id=4933 |
From: SourceForge.net <no...@so...> - 2009-02-28 20:49:37
|
Bugs item #2113751, was opened at 2008-09-16 10:48 Message generated for change (Comment added) made by andrejv You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2113751&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Satoshi Adachi (satoshi_adachi) Assigned to: Nobody/Anonymous (nobody) Summary: Incomprehensible behavior of coeff(). Initial Comment: Dear Developers of Maxima, I met an incomprehensible behavior of coeff(). This is an example program for demonstration: ------------------------------------------------------------------------------ /* * incomprehensible_behavior_of_coeff.maxima: * * S.Adachi 2008/09/13 */ display2d:false; comprehensible_1_0:coeff(%e^x, x, 0); INCOMPREHENSIBLE_2_0:coeff(2*%e^x, x, 0); INCOMPREHENSIBLE_3_0:coeff(3*%e^x, x, 0); comprehensible_1_1:coeff(x*%e^x, x, 1); comprehensible_2_1:coeff(2*x*%e^x, x, 1); comprehensible_3_1:coeff(3*x*%e^x, x, 1); comprehensible_1_2:coeff(x^2*%e^x, x, 2); comprehensible_2_2:coeff(2*x^2*%e^x, x, 2); comprehensible_3_2:coeff(3*x^2*%e^x, x, 2); /* END */ ------------------------------------------------------------------------------ The result of execution is as follows: ------------------------------------------------------------------------------ Maxima 5.14.0cvs http://maxima.sourceforge.net Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) batch(incomprehensible_behavihor_of_coeff.maxima) batching #p/Volumes/HFS+2/home/adachi/work/306/incomprehensible_behavihor_of_coeff.maxima (%i2) display2d : false (%o2) false (%i3) comprehensible_1_0:coeff(%e^x,x,0) (%o3) %e^x (%i4) INCOMPREHENSIBLE_2_0:coeff(2*%e^x,x,0) (%o4) 0 (%i5) INCOMPREHENSIBLE_3_0:coeff(3*%e^x,x,0) (%o5) 0 (%i6) comprehensible_1_1:coeff(x*%e^x,x,1) (%o6) %e^x (%i7) comprehensible_2_1:coeff(2*x*%e^x,x,1) (%o7) 2*%e^x (%i8) comprehensible_3_1:coeff(3*x*%e^x,x,1) (%o8) 3*%e^x (%i9) comprehensible_1_2:coeff(x^2*%e^x,x,2) (%o9) %e^x (%i10) comprehensible_2_2:coeff(2*x^2*%e^x,x,2) (%o10) 2*%e^x (%i11) comprehensible_3_2:coeff(3*x^2*%e^x,x,2) (%o11) 3*%e^x (%o12) "incomprehensible_behavihor_of_coeff.maxima" ------------------------------------------------------------------------------ By seeing the results at other lines, I expect that coeff(2*%e^x,x,0) is calculated to be 2*%e^x and coeff(3*%e^x,x,0) is calculated to be 3*%e^x. However, they are not in actuality. This phenomenon may be a bug of coeff(). Or it may be a part of ``specification'' of coeff(). I cannot judge which is the case. If someone can access some old version of Maxima, which is old enough, he or she can run the above example program by using the old Maxima to get the result by that version of Maxima to compare the result with my result. This may help to judge whether this phenomenon is a bug or a part of specification of coeff(). If this phenomenon is a bug of coeff(), plase fix it. Since this phenomenon of coeff() exists, I had to put an ugly fragment of code in my Maxima program for the workaround. Sincerely yours, Satoshi Adachi ---------------------------------------------------------------------- >Comment By: Andrej Vodopivec (andrejv) Date: 2009-02-28 21:49 Message: I propose this patch should make it work as expected: Index: comm.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/comm.lisp,v retrieving revision 1.32 diff -r1.32 comm.lisp 1053c1053 < ((equal pow 0) (if (free e var) e 0)) --- > ((equal pow 0) (if (coeff-contains-powers e var) 0 e)) 1058a1059,1067 > (defun coeff-contains-powers (e var) > (cond ((alike1 e var) t) > ((atom e) nil) > ((eq (caar e) 'mexpt) > (alike1 (cadr e) var)) > ((eq (caar e) 'mtimes) > (member t (mapcar #'(lambda (e) (coeff-contains-powers e var)) (cdr e)))) > (t nil))) > Andrej ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2113751&group_id=4933 |
From: SourceForge.net <no...@so...> - 2010-05-04 22:29:35
|
Bugs item #2113751, was opened at 2008-09-16 10:48 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2113751&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: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Satoshi Adachi (satoshi_adachi) Assigned to: Nobody/Anonymous (nobody) Summary: Incomprehensible behavior of coeff(). Initial Comment: Dear Developers of Maxima, I met an incomprehensible behavior of coeff(). This is an example program for demonstration: ------------------------------------------------------------------------------ /* * incomprehensible_behavior_of_coeff.maxima: * * S.Adachi 2008/09/13 */ display2d:false; comprehensible_1_0:coeff(%e^x, x, 0); INCOMPREHENSIBLE_2_0:coeff(2*%e^x, x, 0); INCOMPREHENSIBLE_3_0:coeff(3*%e^x, x, 0); comprehensible_1_1:coeff(x*%e^x, x, 1); comprehensible_2_1:coeff(2*x*%e^x, x, 1); comprehensible_3_1:coeff(3*x*%e^x, x, 1); comprehensible_1_2:coeff(x^2*%e^x, x, 2); comprehensible_2_2:coeff(2*x^2*%e^x, x, 2); comprehensible_3_2:coeff(3*x^2*%e^x, x, 2); /* END */ ------------------------------------------------------------------------------ The result of execution is as follows: ------------------------------------------------------------------------------ Maxima 5.14.0cvs http://maxima.sourceforge.net Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) batch(incomprehensible_behavihor_of_coeff.maxima) batching #p/Volumes/HFS+2/home/adachi/work/306/incomprehensible_behavihor_of_coeff.maxima (%i2) display2d : false (%o2) false (%i3) comprehensible_1_0:coeff(%e^x,x,0) (%o3) %e^x (%i4) INCOMPREHENSIBLE_2_0:coeff(2*%e^x,x,0) (%o4) 0 (%i5) INCOMPREHENSIBLE_3_0:coeff(3*%e^x,x,0) (%o5) 0 (%i6) comprehensible_1_1:coeff(x*%e^x,x,1) (%o6) %e^x (%i7) comprehensible_2_1:coeff(2*x*%e^x,x,1) (%o7) 2*%e^x (%i8) comprehensible_3_1:coeff(3*x*%e^x,x,1) (%o8) 3*%e^x (%i9) comprehensible_1_2:coeff(x^2*%e^x,x,2) (%o9) %e^x (%i10) comprehensible_2_2:coeff(2*x^2*%e^x,x,2) (%o10) 2*%e^x (%i11) comprehensible_3_2:coeff(3*x^2*%e^x,x,2) (%o11) 3*%e^x (%o12) "incomprehensible_behavihor_of_coeff.maxima" ------------------------------------------------------------------------------ By seeing the results at other lines, I expect that coeff(2*%e^x,x,0) is calculated to be 2*%e^x and coeff(3*%e^x,x,0) is calculated to be 3*%e^x. However, they are not in actuality. This phenomenon may be a bug of coeff(). Or it may be a part of ``specification'' of coeff(). I cannot judge which is the case. If someone can access some old version of Maxima, which is old enough, he or she can run the above example program by using the old Maxima to get the result by that version of Maxima to compare the result with my result. This may help to judge whether this phenomenon is a bug or a part of specification of coeff(). If this phenomenon is a bug of coeff(), plase fix it. Since this phenomenon of coeff() exists, I had to put an ugly fragment of code in my Maxima program for the workaround. Sincerely yours, Satoshi Adachi ---------------------------------------------------------------------- >Comment By: Dieter Kaiser (crategus) Date: 2010-05-05 00:29 Message: The suggested patch has been committed in comm.lisp revision 1.43. Closing this bug report as fixed. Dieter Kaiser ---------------------------------------------------------------------- Comment By: Andrej Vodopivec (andrejv) Date: 2009-02-28 21:49 Message: I propose this patch should make it work as expected: Index: comm.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/comm.lisp,v retrieving revision 1.32 diff -r1.32 comm.lisp 1053c1053 < ((equal pow 0) (if (free e var) e 0)) --- > ((equal pow 0) (if (coeff-contains-powers e var) 0 e)) 1058a1059,1067 > (defun coeff-contains-powers (e var) > (cond ((alike1 e var) t) > ((atom e) nil) > ((eq (caar e) 'mexpt) > (alike1 (cadr e) var)) > ((eq (caar e) 'mtimes) > (member t (mapcar #'(lambda (e) (coeff-contains-powers e var)) (cdr e)))) > (t nil))) > Andrej ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2113751&group_id=4933 |