# Just Launched: You can now import projects and releases from Google Code onto SourceForge

We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps.

## maxima-bugs

 [Maxima-bugs] [ maxima-Bugs-1901199 ] a polynomial that puts factor() into an infinite loop. From: SourceForge.net - 2008-02-25 08:08:13 ```Bugs item #1901199, was opened at 2008-02-25 17:08 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=1901199&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: a polynomial that puts factor() into an infinite loop. Initial Comment: Dear Developers of Maxima, I met a polynomial that puts factor() into an infinite loop if subres is used as the gcd algorithm. Please look and see the following log: ------------------------------------------------------------------------------ [wisdom3:~/work/283:1] adachi% cat infinite_loop.maxima /* * A polynomial that puts factor() into an infinite loop * if subres is used as the gcd algorithm. * If spmod is used as the gcd algorithm, * this polynomial is factorized normally by factor(). */ display2d:false; gcd:subres; X:(- 64*l^3 - 240*l^2 - 284*l - 105 )*n^4 + (128*l^4 + 672*l^3 + 1288*l^2 + 1062*l + 315 )*n^3 + (- 96*l^5 - 696*l^4 - 1948*l^3 - 2631*l^2 - 1714*l - 430 )*n^2 + (64*l^6 + 528*l^5 + 1792*l^4 + 3192*l^3 + 3137*l^2 + 1608*l + 335 )*n - 32*l^7 - 264*l^6 - 944*l^5 - 1894*l^4 - 2294*l^3 - 1669*l^2 - 672*l - 115; X:expand(X); Y:factor(X); difference:expand(X-Y); [wisdom3:~/work/283:2] adachi% maxima -b infinite_loop.maxima 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(infinite_loop.maxima) batching #p/Volumes/HFS+2/home/adachi/work/283/infinite_loop.maxima (%i2) display2d : false (%o2) false (%i3) gcd:subres (%o3) subres (%i4) X:-115-672*l-1669*l^2-2294*l^3-1894*l^4-944*l^5-264*l^6-32*l^7 +(335+1608*l+3137*l^2+3192*l^3+1792*l^4+528*l^5+64*l^6)*n +(-430-1714*l-2631*l^2-1948*l^3-696*l^4-96*l^5)*n^2 +(315+1062*l+1288*l^2+672*l^3+128*l^4)*n^3 +(-105-284*l-240*l^2-64*l^3)*n^4 (%o4) (-64*l^3-240*l^2-284*l-105)*n^4+(128*l^4+672*l^3+1288*l^2+1062*l+315) *n^3 +(-96*l^5-696*l^4-1948*l^3-2631*l^2 -1714*l-430) *n^2 +(64*l^6+528*l^5+1792*l^4+3192*l^3 +3137*l^2+1608*l+335) *n-32*l^7-264*l^6-944*l^5-1894*l^4 -2294*l^3-1669*l^2-672*l-115 (%i5) X:expand(X) (%o5) -64*l^3*n^4-240*l^2*n^4-284*l*n^4-105*n^4+128*l^4*n^3+672*l^3*n^3 +1288*l^2*n^3+1062*l*n^3+315*n^3-96*l^5*n^2-696*l^4*n^2 -1948*l^3*n^2-2631*l^2*n^2-1714*l*n^2-430*n^2+64*l^6*n +528*l^5*n+1792*l^4*n+3192*l^3*n+3137*l^2*n+1608*l*n+335*n -32*l^7-264*l^6-944*l^5-1894*l^4-2294*l^3-1669*l^2-672*l-115 (%i6) Y:factor(X) ^CMaxima encountered a Lisp error: Console interrupt. ------------------------------------------------------------------------------- Here, I have to terminate the program by a console interrupt. (I extracted the above polynomial from an experence that my own library which implements Zeilberger's algorithm did not return. I had waited for one day before judging my program fell into an infinite loop.) If spmod is used as the gcd algorithm (this is the default now), the above polynomial causes no problem as follows: ------------------------------------------------------------------------------- [wisdom3:~/work/283:3] adachi% cat OK.maxima /* * A polynomial that puts factor() into an infinite loop * if subres is used as the gcd algorithm. * If spmod is used as the gcd algorithm, * this polynomial is factorized normally by factor(). */ display2d:false; gcd:spmod; X:(- 64*l^3 - 240*l^2 - 284*l - 105 )*n^4 + (128*l^4 + 672*l^3 + 1288*l^2 + 1062*l + 315 )*n^3 + (- 96*l^5 - 696*l^4 - 1948*l^3 - 2631*l^2 - 1714*l - 430 )*n^2 + (64*l^6 + 528*l^5 + 1792*l^4 + 3192*l^3 + 3137*l^2 + 1608*l + 335 )*n - 32*l^7 - 264*l^6 - 944*l^5 - 1894*l^4 - 2294*l^3 - 1669*l^2 - 672*l - 115; X:expand(X); Y:factor(X); difference:expand(X-Y); [wisdom3:~/work/283:4] adachi% maxima -b OK.maxima 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(OK.maxima) batching #p/Volumes/HFS+2/home/adachi/work/283/OK.maxima (%i2) display2d : false (%o2) false (%i3) gcd:spmod (%o3) spmod (%i4) X:-115-672*l-1669*l^2-2294*l^3-1894*l^4-944*l^5-264*l^6-32*l^7 +(335+1608*l+3137*l^2+3192*l^3+1792*l^4+528*l^5+64*l^6)*n +(-430-1714*l-2631*l^2-1948*l^3-696*l^4-96*l^5)*n^2 +(315+1062*l+1288*l^2+672*l^3+128*l^4)*n^3 +(-105-284*l-240*l^2-64*l^3)*n^4 (%o4) (-64*l^3-240*l^2-284*l-105)*n^4+(128*l^4+672*l^3+1288*l^2+1062*l+315) *n^3 +(-96*l^5-696*l^4-1948*l^3-2631*l^2 -1714*l-430) *n^2 +(64*l^6+528*l^5+1792*l^4+3192*l^3 +3137*l^2+1608*l+335) *n-32*l^7-264*l^6-944*l^5-1894*l^4 -2294*l^3-1669*l^2-672*l-115 (%i5) X:expand(X) (%o5) -64*l^3*n^4-240*l^2*n^4-284*l*n^4-105*n^4+128*l^4*n^3+672*l^3*n^3 +1288*l^2*n^3+1062*l*n^3+315*n^3-96*l^5*n^2-696*l^4*n^2 -1948*l^3*n^2-2631*l^2*n^2-1714*l*n^2-430*n^2+64*l^6*n +528*l^5*n+1792*l^4*n+3192*l^3*n+3137*l^2*n+1608*l*n+335*n -32*l^7-264*l^6-944*l^5-1894*l^4-2294*l^3-1669*l^2-672*l-115 (%i6) Y:factor(X) (%o6) -(4*l+5)*(n-l-1)^2 *(16*l^2*n^2+40*l*n^2+21*n^2-16*l^2*n-40*l*n-21*n+8*l^4+40*l^3 +78*l^2+70*l+23) (%i7) difference:expand(X-Y) (%o7) 0 ------------------------------------------------------------------------------- This computation reuires just several seconds on my iBook. Acoordingly, the problem which I am reporting in this email seems to be related with the algorithm subres. I know that subres is not anymore the default gcd algorithm but spmod is now the the default gcd algorithm. However, if spmod is used as the gcd algorithm, several my programs written in maxima behave incorrectly (I have alrealy reported it). So, I am still using subres to run my programs. In the past, the developer of maxima suggested that the default gcd algorithm would be switched back to subres again in future. If it is so, please fix the bug of subres which is reported here. Thank you very much for developing maxima. Sincerely yours, Satoshi Adachi ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1901199&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-1901199 ] a polynomial that puts factor() into an infinite loop. From: SourceForge.net - 2008-02-29 00:41:26 ```Bugs item #1901199, was opened at 2008-02-25 03:08 Message generated for change (Comment added) made by dgildea You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1901199&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: a polynomial that puts factor() into an infinite loop. Initial Comment: Dear Developers of Maxima, I met a polynomial that puts factor() into an infinite loop if subres is used as the gcd algorithm. Please look and see the following log: ------------------------------------------------------------------------------ [wisdom3:~/work/283:1] adachi% cat infinite_loop.maxima /* * A polynomial that puts factor() into an infinite loop * if subres is used as the gcd algorithm. * If spmod is used as the gcd algorithm, * this polynomial is factorized normally by factor(). */ display2d:false; gcd:subres; X:(- 64*l^3 - 240*l^2 - 284*l - 105 )*n^4 + (128*l^4 + 672*l^3 + 1288*l^2 + 1062*l + 315 )*n^3 + (- 96*l^5 - 696*l^4 - 1948*l^3 - 2631*l^2 - 1714*l - 430 )*n^2 + (64*l^6 + 528*l^5 + 1792*l^4 + 3192*l^3 + 3137*l^2 + 1608*l + 335 )*n - 32*l^7 - 264*l^6 - 944*l^5 - 1894*l^4 - 2294*l^3 - 1669*l^2 - 672*l - 115; X:expand(X); Y:factor(X); difference:expand(X-Y); [wisdom3:~/work/283:2] adachi% maxima -b infinite_loop.maxima 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(infinite_loop.maxima) batching #p/Volumes/HFS+2/home/adachi/work/283/infinite_loop.maxima (%i2) display2d : false (%o2) false (%i3) gcd:subres (%o3) subres (%i4) X:-115-672*l-1669*l^2-2294*l^3-1894*l^4-944*l^5-264*l^6-32*l^7 +(335+1608*l+3137*l^2+3192*l^3+1792*l^4+528*l^5+64*l^6)*n +(-430-1714*l-2631*l^2-1948*l^3-696*l^4-96*l^5)*n^2 +(315+1062*l+1288*l^2+672*l^3+128*l^4)*n^3 +(-105-284*l-240*l^2-64*l^3)*n^4 (%o4) (-64*l^3-240*l^2-284*l-105)*n^4+(128*l^4+672*l^3+1288*l^2+1062*l+315) *n^3 +(-96*l^5-696*l^4-1948*l^3-2631*l^2 -1714*l-430) *n^2 +(64*l^6+528*l^5+1792*l^4+3192*l^3 +3137*l^2+1608*l+335) *n-32*l^7-264*l^6-944*l^5-1894*l^4 -2294*l^3-1669*l^2-672*l-115 (%i5) X:expand(X) (%o5) -64*l^3*n^4-240*l^2*n^4-284*l*n^4-105*n^4+128*l^4*n^3+672*l^3*n^3 +1288*l^2*n^3+1062*l*n^3+315*n^3-96*l^5*n^2-696*l^4*n^2 -1948*l^3*n^2-2631*l^2*n^2-1714*l*n^2-430*n^2+64*l^6*n +528*l^5*n+1792*l^4*n+3192*l^3*n+3137*l^2*n+1608*l*n+335*n -32*l^7-264*l^6-944*l^5-1894*l^4-2294*l^3-1669*l^2-672*l-115 (%i6) Y:factor(X) ^CMaxima encountered a Lisp error: Console interrupt. ------------------------------------------------------------------------------- Here, I have to terminate the program by a console interrupt. (I extracted the above polynomial from an experence that my own library which implements Zeilberger's algorithm did not return. I had waited for one day before judging my program fell into an infinite loop.) If spmod is used as the gcd algorithm (this is the default now), the above polynomial causes no problem as follows: ------------------------------------------------------------------------------- [wisdom3:~/work/283:3] adachi% cat OK.maxima /* * A polynomial that puts factor() into an infinite loop * if subres is used as the gcd algorithm. * If spmod is used as the gcd algorithm, * this polynomial is factorized normally by factor(). */ display2d:false; gcd:spmod; X:(- 64*l^3 - 240*l^2 - 284*l - 105 )*n^4 + (128*l^4 + 672*l^3 + 1288*l^2 + 1062*l + 315 )*n^3 + (- 96*l^5 - 696*l^4 - 1948*l^3 - 2631*l^2 - 1714*l - 430 )*n^2 + (64*l^6 + 528*l^5 + 1792*l^4 + 3192*l^3 + 3137*l^2 + 1608*l + 335 )*n - 32*l^7 - 264*l^6 - 944*l^5 - 1894*l^4 - 2294*l^3 - 1669*l^2 - 672*l - 115; X:expand(X); Y:factor(X); difference:expand(X-Y); [wisdom3:~/work/283:4] adachi% maxima -b OK.maxima 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(OK.maxima) batching #p/Volumes/HFS+2/home/adachi/work/283/OK.maxima (%i2) display2d : false (%o2) false (%i3) gcd:spmod (%o3) spmod (%i4) X:-115-672*l-1669*l^2-2294*l^3-1894*l^4-944*l^5-264*l^6-32*l^7 +(335+1608*l+3137*l^2+3192*l^3+1792*l^4+528*l^5+64*l^6)*n +(-430-1714*l-2631*l^2-1948*l^3-696*l^4-96*l^5)*n^2 +(315+1062*l+1288*l^2+672*l^3+128*l^4)*n^3 +(-105-284*l-240*l^2-64*l^3)*n^4 (%o4) (-64*l^3-240*l^2-284*l-105)*n^4+(128*l^4+672*l^3+1288*l^2+1062*l+315) *n^3 +(-96*l^5-696*l^4-1948*l^3-2631*l^2 -1714*l-430) *n^2 +(64*l^6+528*l^5+1792*l^4+3192*l^3 +3137*l^2+1608*l+335) *n-32*l^7-264*l^6-944*l^5-1894*l^4 -2294*l^3-1669*l^2-672*l-115 (%i5) X:expand(X) (%o5) -64*l^3*n^4-240*l^2*n^4-284*l*n^4-105*n^4+128*l^4*n^3+672*l^3*n^3 +1288*l^2*n^3+1062*l*n^3+315*n^3-96*l^5*n^2-696*l^4*n^2 -1948*l^3*n^2-2631*l^2*n^2-1714*l*n^2-430*n^2+64*l^6*n +528*l^5*n+1792*l^4*n+3192*l^3*n+3137*l^2*n+1608*l*n+335*n -32*l^7-264*l^6-944*l^5-1894*l^4-2294*l^3-1669*l^2-672*l-115 (%i6) Y:factor(X) (%o6) -(4*l+5)*(n-l-1)^2 *(16*l^2*n^2+40*l*n^2+21*n^2-16*l^2*n-40*l*n-21*n+8*l^4+40*l^3 +78*l^2+70*l+23) (%i7) difference:expand(X-Y) (%o7) 0 ------------------------------------------------------------------------------- This computation reuires just several seconds on my iBook. Acoordingly, the problem which I am reporting in this email seems to be related with the algorithm subres. I know that subres is not anymore the default gcd algorithm but spmod is now the the default gcd algorithm. However, if spmod is used as the gcd algorithm, several my programs written in maxima behave incorrectly (I have alrealy reported it). So, I am still using subres to run my programs. In the past, the developer of maxima suggested that the default gcd algorithm would be switched back to subres again in future. If it is so, please fix the bug of subres which is reported here. Thank you very much for developing maxima. Sincerely yours, Satoshi Adachi ---------------------------------------------------------------------- >Comment By: Dan Gildea (dgildea) Date: 2008-02-28 19:41 Message: Logged In: YES user_id=1797506 Originator: NO Fixed in rat3c.lisp rev 1.19. (%i5) gcd:subres; (%o5) subres (%i6) X:(- 64*l^3 - 240*l^2 - 284*l - 105 )*n^4 + (128*l^4 + 672*l^3 + 1288*l^2 + 1062*l + 315 )*n^3 + (- 96*l^5 - 696*l^4 - 1948*l^3 - 2631*l^2 - 1714*l - 430 )*n^2 + (64*l^6 + 528*l^5 + 1792*l^4 + 3192*l^3 + 3137*l^2 + 1608*l + 335 )*n - 32*l^7 - 264*l^6 - 944*l^5 - 1894*l^4 - 2294*l^3 - 1669*l^2 - 672*l - 115; (%o6) (-64*l^3-240*l^2-284*l-105)*n^4+(128*l^4+672*l^3+1288*l^2+1062*l+315) *n^3 +(-96*l^5-696*l^4-1948*l^3-2631*l^2 -1714*l-430) *n^2 +(64*l^6+528*l^5+1792*l^4+3192*l^3 +3137*l^2+1608*l+335) *n-32*l^7-264*l^6-944*l^5-1894*l^4 -2294*l^3-1669*l^2-672*l-115 (%i7) X:expand(X); (%o7) -64*l^3*n^4-240*l^2*n^4-284*l*n^4-105*n^4+128*l^4*n^3+672*l^3*n^3 +1288*l^2*n^3+1062*l*n^3+315*n^3-96*l^5*n^2-696*l^4*n^2 -1948*l^3*n^2-2631*l^2*n^2-1714*l*n^2-430*n^2+64*l^6*n +528*l^5*n+1792*l^4*n+3192*l^3*n+3137*l^2*n+1608*l*n+335*n -32*l^7-264*l^6-944*l^5-1894*l^4-2294*l^3-1669*l^2-672*l-115 (%i8) Y:factor(X); (%o8) -(4*l+5)*(n-l-1)^2 *(16*l^2*n^2+40*l*n^2+21*n^2-16*l^2*n-40*l*n-21*n+8*l^4+40*l^3 +78*l^2+70*l+23) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1901199&group_id=4933 ```