starange "limit" behaviour



>>>>> "Raymond" == Raymond Toy <raymond.toy@ericsson.com> writes:

    Raymond> (DEFUN ISGREATERP (A B) 
    Raymond>   (let ((TA (car a))
    Raymond> 	(TB (car b)))
    Raymond>     (COND ((or (eq ta 'gen)
    Raymond> 	       (eq tb 'gen))  ())
    Raymond> 	  ((AND (EQ TA TB) (EQ TA 'VAR))
    Raymond> 	   (RATGREATERP (CADDR A) (CADDR B)))
    Raymond> 	  ((and (eq ta tb) (eq ta 'exp))
    Raymond>            ;; Both are exponential order of infinity.  Check the
    Raymond>            ;; exponents to determine which exponent is bigger.
    Raymond> 	   (ratgreaterp (third (second a)) (third (second b))))
    Raymond> 	  ((MEMQ TA (CDR (MEMQ TB *LIMORDER)))))))

    Raymond> we get limit(7^n/8^n, n, inf) => 0.  Also

    Raymond>     limit((2^n+1)/(7^n+1),n,inf) => 0
    Raymond>     limit(7^(n^2)/8^n,n,inf) => inf

In addition, from the bug report, we also have

limit((10^n+9^n+8^n)^(1/n),n,inf) => 10

but

limit(4^n/2^(2*n),n,inf) => inf

I think the change to isgreaterp is correct in this case, but inf is
returned because $asksign says log(4)*n-2*log(2)*n is positive instead
of zero.  asksign(log(4)*n-2*log(2)*n) returns zero, if entered
directly.  So, something about $asksign being called while computing
limits causes it to return different answers.

Ray