Fitting in Maxima



?iga Lenar?i? wrote:
>
> 4) Will there be possibility to call compiled numerical libraries  
> (ATLAS ..) from lisp in the future? I know gcl is kinda the limiting  
> factor right now..  I think f2cl conversions of numerical libraries  
> should not be a part of maxima. Especially if the user has to call  
> them with their fortran names. It's better to implement an  
> unoptimised original algorithm in lisp by hand (and tailored to  
> maxima's needs), since f2cl translations do not inherit the speed of  
> original fortran porgrams, neither are they consistent with other  
> maxima code or gain anything. So it's like using fortran without  
> speed, why would you do that? Ideally we should use ATLAS for  
> numerical linear algebra, so speed-wise maxima would be on par with  
> MATLAB and mathematica. Any chance of this becoming reality?
>   
The names are the LAPACK names because no one has come up with good
names.  Feel free to suggest new names and implement the appropriate
interface.  I haven't heard many comments about LAPACK support, so it
seems no one is really using it at all.

The best part of the f2cl translations is that no one else had to spend
their time writing Lisp equivalents for them.  Doing something like
LAPACK from scratch by hand in Lisp seems like a huge waste of time.  
That the translations aren't as fast as the original Fortran is not a
fault of the translation but of the Lisp used to compile it.  Rewriting
it in Lisp won't solve the speed problem if your Lisp can't do a good
job of compiling the f2cl-converted code.

If you feel like rewriting LAPACK in Lisp and can do as good a job as
the original authors, please do so. 

There is also one other possibility that the f2cl translations gives
us.  With a bit of  extra Lisp code, we can convert the current
double-float LAPACK routines into arbitrary precision LAPACK routines. 
I know this can be done because I automatically converted many of  the
routines to work with quad-double precision numbers.  That would have
been quite a bit more difficult without the Lisp translation.

>
> I would like Fit to use svd instead of ^^-1, since it's more robust,  
> but looks like i have to implement svd first? How and where should  
> svd be implemented in Maxima?
>   
If it were me, I'd just hook up an interface to LAPACK's svd function. 
If you think you can write one from scratch that is as good and robust
as LAPACK, go ahead.

Ray, who thinks there's a reason why there are apparently no other
competing packages for LAPACK.