program works with maxima 5.29.1 but freezes with maxima 5.30.0
Subject: program works with maxima 5.29.1 but freezes with maxima 5.30.0
From: Dmitry Shkirmanov
Date: Tue, 16 Apr 2013 21:15:29 +0400
It seems that expand, not subst causes the problem. Does maxima show you
the expr1 in the end of the attached program? I cannot see it, maxima
consums all available memory and just hangs up.
> Dmitry Shkirmanov<piminusmeson at bk.ru> writes:
>
>> Hello, list. I have wxmaxima program that takes a few seconds to run
>> with maxima 5.29.1. But in maxima 5.30.0 it freezes. Is there any
>> way to make it work with maxima 5.30?
>>
>> The program is attached. Sorry, i cannot provide more simple example
>> as i have no idea what is going on.
>>
> Well, I had a quick play and I'm pleased to say that the program doesn't
> hang in the scarily huge substitution (although it took about 3 minutes
> on my laptop). However, the next (and last) line of your code is a call
> to ratsimp. It ran for more than five minutes before I killed it.
>
> The result of the massive substitution was rather enormous, though. I
> guess it wasn't on the previous version? I can't really guess what it
> should have been because I don't understand the maths behind what you're
> doing.
>
> My *guess* is that something simplified massively when you did the big
> substitution on the previous version of Maxima and, as a result, the
> runtime was reasonable. Probably, something is getting simplified
> slightly differently with 5.30.0 and either one of your subscripted
> values (e.g. SK3_VEK_uu_VEK_uu[b,c,b,c]) or the matching part of
> any_expr has a slightly different form. Since subst() matches
> syntactically, this means the substitution doesn't happen and you end up
> with this massive unwieldy expression instead of something you can work
> with.
>
> Maybe you could try doing the substitution a bit at a time to see what's
> going wrong? I've used things like
>
> slow_subst (lst, expr) :=
> (for x in lst do
> (print ("Doing: ", x), expr: ratsimp (subst (x, expr))),
> expr)$
>
> in the past to see how things are going. You could also print out the
> successive values of expr: maybe that would show you where the
> substitution was misbehaving.
>
> Rupert
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp3.wxm
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130416/cec0244c/attachment-0001.ksh>