From: SourceForge.net <noreply@so...>  20070131 20:36:01

Bugs item #771061, was opened at 20030714 11:52 Message generated for change (Comment added) made by willisbl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=771061&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: None Group: Includes proposed fix >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Stavros Macrakis (macrakis) Assigned to: Nobody/Anonymous (nobody) Summary: expand dot expr > fatal error/FIX Initial Comment: expand((vt . a^^(1) . u+1)^^(2)) causes a stack overflow (sometimes crashing Maxima entirely) ... infinite recursion in simpncexpt  >Comment By: Barton Willis (willisbl) Date: 20070131 14:35 Message: Logged In: YES user_id=895922 Originator: NO Suggested fixed applied (mdot.lisp CVS r 1.4_; also appended new regression test (rtest_dot.mac).  Comment By: Stavros Macrakis (macrakis) Date: 20030819 13:22 Message: Logged In: YES user_id=588346 Here is a fix. Note that this does NOT solve the general problem of expanding .expressions. For example, it does not expand a . (a + 1)^^1 to a^^1 + 1. But I wanted to get the fatal error fixed first. Also, it is not clear that Expand gives you enough fine control to do that sort of thing reasonably.  Fix in simpncexpt ;; This does the same thing as above for (A+B)^^(2) ;; and (A.B)^^(2). ((and (or (mplusp factor) (and (not $dotexptsimp) (mnctimesp factor))) (fixnump power) (not (greaterp (minus power) $expon)) (< power 1)) (let (($expop $expon)) (ncpower (ncpower factor ( power)) 1)))  Comment By: Stavros Macrakis (macrakis) Date: 20030714 23:52 Message: Logged In: YES user_id=588346 Simpler case: (a + 1)^^(1) . (a + 1)^^(1), expon:2; The problem is that simpnct and simpncexpt are passing the buck to each other in cases like this. Simpncexpt correctly expands (a+1)^^3 as (a+1).(a+1)^^2, letting simpnct take care of the expansion, which it does. But it also tries to expand (a+1)^^(3) as (a+1)^^1 . (a+1)^^2, but simpnct doesn't recognize that case. Another, less dramatic, bug: expand(a^^1 . (b+c)^^1) does not expand at all. Note that there's no way to combine the parts within the powers without expanding out the powers  same problem with commutative multiplication. That is, how do I simplify a^n * (1+1/a)^n => (a * (1+1/a))^n => (a+1)^n , or to get a little fancier, (1/a+1)^(n+k)*a^(n+m) => a^(mk)*(a+1)^ (n+k). Radcan will do it, but at the cost of losing control over the simplification. Perhaps some variant of multthru is needed, or a new powerscontract.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=771061&group_id=4933 