From: Dan G. <dg...@us...> - 2010-03-12 10:16:59
|
Update of /cvsroot/maxima/maxima/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12420/src Modified Files: limit.lisp compar.lisp Log Message: src/limit.lisp: o limit2: handle case where numerator is ind and negative fixes limit(x/(sin(x)-2), x, inf) src/compar.lisp: o signdiff-special: handle sign(sin(x)+2) tests/rtest16.mac: o I think limit(x/sin(x)^2, x, inf) is undefined. tests/testsuite.lisp: o two new tests work now Index: limit.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/limit.lisp,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- limit.lisp 10 Feb 2010 19:34:03 -0000 1.93 +++ limit.lisp 12 Mar 2010 10:16:47 -0000 1.94 @@ -703,14 +703,16 @@ (and (eq n1 '$und) (not (real-infinityp d1)))) (return '$und)) ((eq d1 '$ind) - ;; At this point we have n1/$ind. Look if n1 is one of the - ;; infinities or zero. - (cond ((eq n1 '$inf) (return '$inf)) - ((eq n1 '$infinity) (return '$infinity)) - ((and (not (eq n1 '$ind)) - (eq ($csign n1) '$zero)) - (return 0)) - (t (return '$und)))) + ;; At this point we have n1/$ind. Look if n1 is one of the + ;; infinities or zero. + (cond ((and (infinityp n1) (eq ($sign dn) '$pos)) + (return n1)) + ((and (infinityp n1) (eq ($sign dn) '$neg)) + (return (simpinf (m* -1 n1)))) + ((and (not (eq n1 '$ind)) + (eq ($csign n1) '$zero)) + (return 0)) + (t (return '$und)))) ((eq n1 '$ind) (return (cond ((infinityp d1) 0) ((equal d1 0) '$und) (t '$ind)))) ;SET LB Index: compar.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/compar.lisp,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- compar.lisp 1 Feb 2010 09:26:06 -0000 1.66 +++ compar.lisp 12 Mar 2010 10:16:48 -0000 1.67 @@ -1317,6 +1317,16 @@ (eq (sign* (sub (cadr xlhs) 1)) '$pos) (eq (sign* (sub (caddr xlhs) (caddr xrhs))) '$pos))) (setq sgn '$pos)) + + ;; sign(sin(x)+c) + (when (and (not (atom xlhs)) + (member (caar xlhs) '(%sin %cos)) + (zerop1 ($imagpart (cadr xlhs)))) + (cond ((eq (sign* (add xrhs 1)) '$neg) ;; c > 1 + (setq sgn '$pos)) + ((eq (sign* (add xrhs -1)) '$pos) ;; c < -1 + (setq sgn '$neg)))) + (when (and $useminmax (or (minmaxp xlhs) (minmaxp xrhs))) (setq sgn (signdiff-minmax xlhs xrhs))) (when sgn (setq sign sgn minus nil odds nil evens nil) @@ -1496,7 +1506,7 @@ (*complexsign* (setf sign '$complex)) (t (setf sign '$pnz))) sign) - + (defun sign-mabs (x) (sign (cadr x)) (cond ((member sign '($pos $zero) :test #'eq)) |