#2536 Lisp error in limit: "bad gvar lim"

Dan Gildea
Robert Dodier
    bar : (9*log((-1)^n/%phi^n-%phi^n)-9*log(5)/2+log(-1))
    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, in hayat.lisp. The reason for the error is that the leading variable in a logarithm that it is trying to expand has limit infinity (as in complex infinity, rather than inf or minf).

    This limit is stored in tvar-limits, which come out for me as something like:

    tvar-limits = ((G59101 . $ZEROA) (G58634 . $INFINITY) (G58397 . $INFINITY)
                   (G58290 . $INFINITY))

    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 and tvar-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?

  • Dan Gildea
    Dan Gildea

    Fixed in git:

    Fix #2536 Lisp error in limit: "bad gvar lim"
    Fix #2475 limit(x^(mu/x^g),x,inf) --> error

    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))
    limit (bar, n, inf);
    now returns one.

  • Dan Gildea
    Dan Gildea

    • status: open --> closed
    • assigned_to: Dan Gildea