From: SourceForge.net <no...@so...> - 2008-03-09 12:45:21
|
Bugs item #1372477, was opened at 2005-12-03 14:09 Message generated for change (Comment added) made by willisbl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1372477&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Simplification Group: Includes proposed fix >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Barton Willis (willisbl) Assigned to: Nobody/Anonymous (nobody) Summary: log(neg integer) not fully simplified/fix Initial Comment: (%i1) declare(n,integer); (%o1) DONE (%i2) assume(n > 0); (%o2) [n>0] (%i3) log(-n^2), lognegint, logexpand; An extra log expand is needed: (%o3) log(n^2)+%i*%pi (%i4) %,logexpand; (%o4) 2*log(n)+%i*%pi A putative fix; in simpln, replace (add2 '((mtimes simp) $%i $%pi) (cond ((equal y -1) 0) (t (list '(%log simp) (neg y)))))) with something like (and $lognegint (maxima-integerp y) (eq ($sign y) '$neg)) (add (mul '$%i '$%pi) (take '(%log) (neg y)))) If both ($sign y) and ($sign (neg y)) evaluate to '$neg, we're toast. But that would never happen... Barton ---------------------------------------------------------------------- >Comment By: Barton Willis (willisbl) Date: 2008-03-09 07:45 Message: Logged In: YES user_id=895922 Originator: YES Fixed by simp.lisp cvs revision 1.53. ---------------------------------------------------------------------- Comment By: Robert Dodier (robert_dodier) Date: 2006-08-14 21:43 Message: Logged In: YES user_id=501686 Observed in 5.9.3cvs. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1372477&group_id=4933 |