apparent bug with cmucl compiles to sse2



Hello,

while playing with matrix diagonalization on maxima cmucl,
using jacobi technique on a macbook i found a problem. Compiling 
eigens-by-jacobi.lisp produces eigens-by-jacobi.ssl2   which runs fast, but
unfortunately gives false results. On another P4 machine the same gives
eigens-by-jacobi.xf86 which also runs fast but with apparently correct
results (i have checked with a Mathematica computation). According to cmucl
documentation there is a way to disable the sse2 extensions when compiling,
but i don't know how to access that under maxima with compile_file().

By the way, here is the small program which exhibits these problems,
the smallest and biggest eigenvalues are completely astray for .sse2.
When directly running the lisp program this runs for a *very* long time!
When compiled it runs at same speed or faster than Mathematica.

s:50;
numer:true;
hbar: 1/s;
kappa:-sqrt(2)/2;
/* this has to do with quantum oscillators and spin problems */
H[i,j]:= if i=j then -kappa*hbar*(2*s-2*i)
else if j = i-1 then hbar^(3/2) *i*sqrt(2*s+1-i)
else if j = i+1 then hbar^(3/2) * (i+1)*sqrt(2*s-i)
else 0;
M: genmatrix(H,2*s+1,2*s+1);
/* M is symmetric*/
t: eigens_by_jacobi (M)$
eig:part(t,1);
eig: sort(-eig);
u:create_list(i,i,1,101);
plot2d([discrete,u,eig]);
/* the repartition of eigenvalues is interesting */

-- 
Michel Talon