Your code seems to work fine with four different versions of LISP here,
including CMUCL:
$ ./maxima-local --lisp clisp
Maxima 5.10.0cvs http://maxima.sourceforge.net
Using Lisp CLISP 2.35 (2005-08-29)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1) load(ept);
(%o1) /home/vttoth/dev/maxima/share/tensor/ept.mac
(%i2) showtime:true;
Evaluation took 0.00 seconds (0.00 elapsed) using 32 bytes.
(%o2) true
(%i3) Esparse(A,27,30,1e-10);
MAX reached and ERR not achieved; try decreasing
ERR or increasing MAX
Evaluation took 1.26 seconds (1.26 elapsed) using 9.840 MB.
(%o3) done
(%i4) Esparse(A,27,130,1e-10);
Evaluation took 4.43 seconds (4.44 elapsed) using 34.631 MB.
(%o4) 1.5277485879658
(%i5)
$ ./maxima-local --lisp gcl
Maxima 5.10.0cvs http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1) load(ept);
(%o1) /home/vttoth/dev/maxima/share/tensor/ept.mac
(%i2) showtime:true;
Evaluation took 0.00 seconds (0.00 elapsed)
(%o2) true
(%i3) Esparse(A,27,30,1e-10);
MAX reached and ERR not achieved; try decreasing
ERR or increasing MAX
Evaluation took 0.30 seconds (0.31 elapsed)
(%o3) done
(%i4) Esparse(A,27,130,1e-10);
Evaluation took 1.14 seconds (1.16 elapsed)
(%o4) 1.5277485879658
(%i5)
$ ./maxima-local --lisp cmucl
Maxima 5.10.0cvs http://maxima.sourceforge.net
Using Lisp CMU Common Lisp 19c (19C)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1) load(ept);
(%o1) /home/vttoth/dev/maxima/share/tensor/ept.mac
(%i2) showtime:true;
Evaluation took 0.00 seconds (0.00 elapsed) using 32 bytes.
(%o2) true
(%i3) Esparse(A,27,30,1e-10);
MAX reached and ERR not achieved; try decreasing
ERR or increasing MAX
Evaluation took 0.28 seconds (0.36 elapsed) using 10.557 MB.
(%o3) done
(%i4) Esparse(A,27,130,1e-10);
Evaluation took 0.98 seconds (0.98 elapsed) using 40.754 MB.
(%o4) 1.5277485879658
(%i5)
$ ./maxima-local --lisp sbcl
Maxima 5.10.0cvs http://maxima.sourceforge.net
Using Lisp SBCL 0.9.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1) load(ept);
(%o1) /home/vttoth/dev/maxima/share/tensor/ept.mac
(%i2) showtime:true;
Evaluation took 0.00 seconds (0.00 elapsed) using 0 bytes.
(%o2) true
(%i3) Esparse(A,27,30,1e-10);
MAX reached and ERR not achieved; try decreasing
ERR or increasing MAX
Evaluation took 0.25 seconds (0.39 elapsed) using 10.772 MB.
(%o3) done
(%i4) Esparse(A,27,130,1e-10);
Evaluation took 0.87 seconds (0.89 elapsed) using 40.004 MB.
(%o4) 1.5277485879658
(%i5)
Viktor
-----Original Message-----
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of sen1 at math.msu.edu
Sent: Monday, December 11, 2006 9:15 PM
To: Raymond Toy
Cc: maxima at math.utexas.edu
Subject: Re: [Maxima] cmucl vs. gcl
On Mon, 11 Dec 2006, Raymond Toy wrote:
> sen1 at math.msu.edu wrote:
>> On Mon, 11 Dec 2006, sen1 at math.msu.edu wrote:
>>
>> whoops, in the last post I had some other aliases (e.g. "flt" for
"float",
>> "prt" for "print".
>>
> You missed one flt and one prt.
>
> How am I supposed to run this? Esparse(A,27,30,1e-10)?
>
> If so, I have no problems running it on my copy of cmucl (on solaris).
> However, Esparse just says I should increase MAX or decrease ERR.
The program is designed for an irreducible non-negative matrix.
Such matrices have a unique real eigenvalue of largest magnitude.
If A is such a matrix, the program takes a random vector v and
successively does the following.
1. compute the product A.v
2. normalize (i.e., divide by the norm) and repeat until either
MAX iterates have been run or the difference between the current
unit vector and the previous is less than ERR.
When ERR is achieved, the next length of A.v is approximately the
largest eigenvalue.
If the message is printed, just rerun the program with MAX larger
(ie., more iterates), or ERR bigger (not a good idea if you really
want an estimate for the largest eigenvalue).
So, you managed to run it with the 27x27 C on cmucl?
With what MAX and what ERR?
With gcl, here is what I get with various MAX and ERR values.
(%i12) showtime: true;
Evaluation took 0.00 seconds (0.00 elapsed) using 96 bytes.
(%o12) true
(%i13) Esparse(A,27,30,1e-10);
MAX reached and ERR not achieved; try decreasing
ERR or increasing MAX
Evaluation took 2.16 seconds (2.25 elapsed) using 9.783 MB.
(%o13) done
(%i14) Esparse(A,27,130,1e-10);
Evaluation took 8.20 seconds (14.09 elapsed) using 33.274 MB.
(%o14) 1.5277485879658
So, the eigenvalue is approx 1.5277...
Using matlab, one gets: 1.52774858799907,
so the program seems to work (although it is a bit slow).
>
>
> Ray
>
--
---------------------------------------------------------------------------
| Sheldon E. Newhouse | e-mail: sen1 at math.msu.edu
|
| Mathematics Department | |
| Michigan State University | telephone: 517-355-9684
|
| E. Lansing, MI 48824-1027 USA | FAX: 517-432-1562
|
---------------------------------------------------------------------------
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima