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: Rupert Swarbrick
Date: Tue, 16 Apr 2013 15:31:43 +0100
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130416/6e460ac8/attachment.pgp>