bar : (9*log((-1)^n/%phi^n-%phi^n)-9*log(5)/2+log(-1)) /log((%phi^(9*n)-(-1)^(9*n)/%phi^(9*n))/sqrt(5) -((-1)^n/%phi^n-%phi^n)*((-1)^(8*n)/%phi^(8*n)-%phi^(8*n))/5)$ limit (bar, n, inf); => Maxima encountered a Lisp error: bad gvar lim
This is a variation on bug #2535 which triggers a different error.
Same behavior with Maxima 5.28.0 + CMUCL, 5.29.1 + Clisp, current Git (post-5.29) + Clisp.
Grr. Just wrote a careful reply and the sourceforge website ate it. I'll type comments up in an Emacs buffer in future.
I don't know what exactly has gone wrong, but maybe the following info will save someone else some hassle. The error is being thrown by
pslog
, inhayat.lisp
. The reason for the error is that the leading variable in a logarithm that it is trying to expand has limitinfinity
(as in complex infinity, rather thaninf
orminf
).This limit is stored in
tvar-limits
, which come out for me as something like:Moreover, these limits really are complex infinity. For example, one comes about as the limit (as n \to \infty) of
%e^((7*log(%phi)+log(-1))*n)
.I don't know whether
pslog
should be able to deal with complex infinities, or whether something has gone wrong earlier andtvar-limits
are all supposed to be real (that doesn't look so likely to me, but maybe I'm wrong).Anyone got any further ideas?
Fixed in git:
Fix #2536 Lisp error in limit: "bad gvar lim"
Fix #2475 limit(x^(mu/x^g),x,inf) --> error
src/hayat.lisp:
o tvar-lim: call tay-error instead of error
o pslog: call tay-error instead of error
For both bug reports, taylor series now fails, but without giving
a user error.
limit(x^(mu/x^g),x,inf) now returns nounform,
bar : (9log((-1)^n/%phi^n-%phi^n)-9log(5)/2+log(-1))
/log((%phi^(9n)-(-1)^(9n)/%phi^(9n))/sqrt(5)
-((-1)^n/%phi^n-%phi^n)((-1)^(8n)/%phi^(8n)-%phi^(8*n))/5)$
limit (bar, n, inf);
now returns one.