apparent bug with cmucl compiles to sse2x2001



Andrej Vodopivec wrote:

> On Sat, Feb 21, 2009 at 11:41 PM, Barton Willis <willisb at unk.edu> wrote:
>> -----maxima-bounces at math.utexas.edu wrote: -----
>>
>>>The genmatrix function seems to be pretty slow -- it could well be that
>>>just to construct M takes longer than computing the eigenvalues.
>>
>> Using s = 50, double floats, and compiled eigens-by-jacobi & mring:
>>
>>  eigens_by_jacobi 9.9 sec
>>  genmatrix 0.61 sec.
> 
> Now that share packages can be compiled without root access perhaps
> linearalgebra should also be compiled when it is loaded.
> 
> Andrej


I have just run the program for spin S=1000, as i intended, that is a 
2001x2001 matrix. Of course not with Jacobi algorithm, but by dgeev.
On my laptop (1.6 Ghz Core 2) the timings are:
genmatrix : 300 s
dgeev : 916 s
So indeed it would be fine if genmatrix was faster, it takes an inordinate
amount of time, compared to all the work that dgeev does.

As for the bump or glitch i mentioned it was caused by a bad translation
from Mathematica matrix indices to Maxima ones, i.e. one has to do i -> i-1

Hence the correct definition of H is:
H[i,j]:= if i=j then -kappa*hbar*(2*s-2*i+2)
        elseif j = i-1 then hbar^(3/2) *(i-1)*sqrt(2*s+2-i)
        elseif j = i+1 then hbar^(3/2) *i*sqrt(2*s-i+1)
        else 0;
everything else the same.

Then one can check the matrices are identical, and the plots are similar.

Remarkably the plot for S= 1000 looks very much the same as the plot for
S=50. This may indicate that the classical limit S -> infinity, hbar -> 0
is not out of approach. Of course i don't know if these numerical results
are correct.  

Thanks for the help and the kind attention you gave me.

-- 
Michel Talon