Bugs and strange behaviours of Maxima with ratmx and sparse set to true
Subject: Bugs and strange behaviours of Maxima with ratmx and sparse set to true
From: Stefano Ferri
Date: Wed, 28 Jan 2009 10:32:03 +0100
Robert Dodier ha scritto:
> On 1/27/09, Stefano Ferri <ferriste at gmail.com> wrote:
>
>
>> (%i5) determinant(K);
>>
>> Maxima encountered a Lisp error:
>>
>> FUNCALL: undefined function TMLATTICE
>>
>
> Sorry, it's my fault. I removed the file which contained that function
> a few years ago in an effort to clean up the code ... I'll restore it.
>
> Robert Dodier
Ok ;-)
> Maybe you have already solved your problem; for what it is worth, I'd try
> something like:
>
> (%i19) algebraic : true$
> (%i20) ratmx : true$
>
> (%i21) KT : triangularize(K)$
> Evaluation took 0.2900 seconds (0.2900 elapsed)
>
> (%i22) last(KT);
> (%o22)
> [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(5072270477230080*bk^17*l^67*A^7*E^21
> +2028908190892032*bk^18*l^68*A^6*E^20)*I^14]
>
> (%i23) factor(last(%));
> (%o23) 1014454095446016*bk^17*l^67*A^6*E^20*(5*A*E+2*bk*l)*I^14
>
>
> Barton
>
>
Yes, maybe there are many ways to improve speed, but please forget I
have to solve a system. I need to do it with inversion because unknows
are identified only by their position in the column vector, I don' know
if with other methods is possible to keep these positions... Anyway,
computation times in my notebook are not so different:
(%i2) K^^-1$
Evaluation took 3.3522 seconds (4.0273 elapsed) using 27.563 MB.
(%i1) triangularize(K)$
Evaluation took 2.0681 seconds (2.5926 elapsed) using 13.593 MB.
Forgotten? Ok :-)
Thank you Barton for the idea of algebraic:true, I noticed that
inversion of the given matrix K is not yet affected by the value of
sparse. In fact, one only need to set
algebraic:true;
ratmx:true;
kill(all);
before all to speed up the inversion. This always works. There is a .mac
file attached to this mail if somebody wants to try.
I still don't understand why in the program I'm writing I don't need to
set algebraic:true, but I need to set sparse:true. If in the .mac sample
file attached one tryes to comment algebraic:true, and uncomment
sparse:true, inversion is very long (I've never seen its end so far :-).
In my program there is a main file, in wich I set the values of option
variables, wich loads other files in wich K and K^^-1 are computed. In
this way, setting ratmx and sparse to true works. Algebraic is still set
to false at the end, there is nothing that chamges its value. In the
attached prova4.mac one have to set algebraic to true to make K^^-1
working...
Sorry for the confusion but I don't understand why sometimes sparse
works, other times only algebraic works fine...
Stefano
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: prova4.mac
Url: http://www.math.utexas.edu/pipermail/maxima/attachments/20090128/54641a7a/attachment-0001.diff