- labels: --> Lisp Core - Limit
Limit should presumably only accept variable names (symbols and subscripted symbols) as its second argument. It currently doesn't check, and gives nonsense results with non-variablename arguments:
limit(1/x,1/x,inf) => inf
(OK, why not? but see examples below)
limit(x,x^3,inf) => x (NO, should be inf if anything)
limit(x,1/x,inf) => x (NO, should be 0 if anything)
limit(sin(x),x*y,inf) => sin(x) (???)
limit(x^2+2,x^2-2,3) => x^2+2
(I suppose this ought to be 7)
Sometimes, unsurprisingly, it gets internal errors:
limit(x,sin(x),inf);
Maxima encountered a Lisp error:
Error in PROGN [or a callee]: Bad plist ($X)
Maxima 5.11.0 GCL 2.6.8 W2k Athlon
Logged In: YES
user_id=1797506
Originator: NO
Added error checking in limit.lisp rev 1.47.
(%i52) limit(1/x, 1/x, inf);
Improper limit variable - `limit'
-- an error. To debug this try debugmode(true);
Log in to post a comment.