This should either ask for the parity of n, or return something like (-1)^n * minf. It should not ask if `1' is zero or nonzero.
(%i1) declare(n,integer)$
(%i2) assume(n < 0)$
(%i3) limit((-1)^n/zerob);
"Is "1" zero or nonzero?"nz;
(%o3) minf
Agreed this is a bug.
Single-argument
limitisn't supposed to return things like(-1)^n*minf, but to resolve them. In this case, I think the only correct result isinfinity, which is what it returns forlimit((-1)^x/zerob)andlimit((-1)^(-x^2-1)/zerob)with no declarations onx.FYI: For the bit of code I was working with, I worked around this bug by using
ask-integerto determine the parity of the integer. Not ideal, but it works.