From: SourceForge.net <no...@so...> - 2008-08-31 18:36:34
|
Bugs item #2085440, was opened at 2008-08-31 13:44 Message generated for change (Settings changed) made by rvh2007 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2085440&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 Private: No Submitted By: The Henman (rvh2007) Assigned to: Nobody/Anonymous (nobody) >Summary: Compiled Function error message Initial Comment: Try the following. (%i1) f(x) := x$ (%i2) f(1,2); Too many arguments supplied to f(x): [1,2] (%i3) compile(f)$ (%i4) f(1,2); Maxima encountered a Lisp error: Error in MACSYMA-TOP-LEVEL [or a callee]: MACSYMA-TOP-LEVEL [or a callee] requires less than two arguments. "The error message tells the user almost nothing. I consider that a bug. Barton" Rich Hennessy ------ Maxima version: 5.16.2 Maxima build date: 7:44 8/18/2008 host type: i686-pc-mingw32 lisp-implementation-type: GNU Common Lisp (GCL)lisp-implementation-version: GCL 2.6.8 ------ ---------------------------------------------------------------------- Comment By: The Henman (rvh2007) Date: 2008-08-31 13:54 Message: Logged In: YES user_id=2055069 Originator: YES I think I figured it out, you have to have a function defined and it also has to be compiled. this works (%i1) factor(-hbar^2/(2*m)*diff(f(x),x,2)=E*f(x)-mu*x^4*f(x)); (%o1) -(hbar^2*('diff(f(x),x,2)))/(2*m)=f(x)*(E-mu*x^4) if f is defined as a function of two or more variables and it is not compiled then you get this error. (%i1) f(x,y):=x^2*y; (%o1) f(x,y):=x^2*y (%i2) factor(-hbar^2/(2*m)*diff(f(x),x,2)=E*f(x)-mu*x^4*f(x)); Too few arguments supplied to f(x,y):[x] -- an error. To debug this try debugmode(true); which is a better error message. but if you compile f then you get (%i1) f(x,y):=x^2*y; (%o1) f(x,y):=x^2*y (%i2) compile(f); Compiling C:/DOCUME~1/RICHAR~1/LOCALS~1/Temp/gazonk_3888_0.lsp. End of Pass 1. End of Pass 2. OPTIMIZE levels: Safety=2, Space=3, Speed=3 Finished compiling C:/DOCUME~1/RICHAR~1/LOCALS~1/Temp/gazonk_3888_0.lsp. (%o2) [f] (%i3) factor(-hbar^2/(2*m)*diff(f(x),x,2)=E*f(x)-mu*x^4*f(x)); Maxima encountered a Lisp error: Error in MACSYMA-TOP-LEVEL [or a callee]: MACSYMA-TOP-LEVEL [or a callee] requires more than one argument. Automatically continuing. To reenable the Lisp debugger set *debugger-hook* to nil. Which is a harder message to debug. I think I may have had a definition for f after all and it was compiled too since I have a workbook which does just that and I was playing around with that workbook last night before I got this error. So it only happens on compiled functions so far in my testing. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2085440&group_id=4933 |
From: SourceForge.net <no...@so...> - 2009-07-16 15:52:24
|
Bugs item #2085440, was opened at 2008-08-31 13:44 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2085440&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 Private: No Submitted By: Rich Hennessy (rvh2007) Assigned to: Nobody/Anonymous (nobody) Summary: Compiled Function error message Initial Comment: Try the following. (%i1) f(x) := x$ (%i2) f(1,2); Too many arguments supplied to f(x): [1,2] (%i3) compile(f)$ (%i4) f(1,2); Maxima encountered a Lisp error: Error in MACSYMA-TOP-LEVEL [or a callee]: MACSYMA-TOP-LEVEL [or a callee] requires less than two arguments. "The error message tells the user almost nothing. I consider that a bug. Barton" Rich Hennessy ------ Maxima version: 5.16.2 Maxima build date: 7:44 8/18/2008 host type: i686-pc-mingw32 lisp-implementation-type: GNU Common Lisp (GCL)lisp-implementation-version: GCL 2.6.8 ------ ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2009-07-16 11:52 Message: The message is from the underlying Lisp implementation. But consider this: h(x,y,[r]) := [x,y,r]; h(1,2) -> [1,2,[]] h(1)-> Too few arguments supplied to h(x,y,[r]): [1] After compiling h, we get: h(1,2) -> [1,2,[]] h(1) -> maxima-error h TAKES NO LESS THAN 2 ARGUMENTS. I think this is better. (I think the error message should match what the uncompiled version says, but that's a different issue.) The translator should do something similar with f as it does for h. Except, of course, extra arguments aren't allowed. ---------------------------------------------------------------------- Comment By: Rich Hennessy (rvh2007) Date: 2008-08-31 13:54 Message: Logged In: YES user_id=2055069 Originator: YES I think I figured it out, you have to have a function defined and it also has to be compiled. this works (%i1) factor(-hbar^2/(2*m)*diff(f(x),x,2)=E*f(x)-mu*x^4*f(x)); (%o1) -(hbar^2*('diff(f(x),x,2)))/(2*m)=f(x)*(E-mu*x^4) if f is defined as a function of two or more variables and it is not compiled then you get this error. (%i1) f(x,y):=x^2*y; (%o1) f(x,y):=x^2*y (%i2) factor(-hbar^2/(2*m)*diff(f(x),x,2)=E*f(x)-mu*x^4*f(x)); Too few arguments supplied to f(x,y):[x] -- an error. To debug this try debugmode(true); which is a better error message. but if you compile f then you get (%i1) f(x,y):=x^2*y; (%o1) f(x,y):=x^2*y (%i2) compile(f); Compiling C:/DOCUME~1/RICHAR~1/LOCALS~1/Temp/gazonk_3888_0.lsp. End of Pass 1. End of Pass 2. OPTIMIZE levels: Safety=2, Space=3, Speed=3 Finished compiling C:/DOCUME~1/RICHAR~1/LOCALS~1/Temp/gazonk_3888_0.lsp. (%o2) [f] (%i3) factor(-hbar^2/(2*m)*diff(f(x),x,2)=E*f(x)-mu*x^4*f(x)); Maxima encountered a Lisp error: Error in MACSYMA-TOP-LEVEL [or a callee]: MACSYMA-TOP-LEVEL [or a callee] requires more than one argument. Automatically continuing. To reenable the Lisp debugger set *debugger-hook* to nil. Which is a harder message to debug. I think I may have had a definition for f after all and it was compiled too since I have a workbook which does just that and I was playing around with that workbook last night before I got this error. So it only happens on compiled functions so far in my testing. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2085440&group_id=4933 |