On 11/11/2011 2:23 AM, Michel Talon wrote:
> Conrad Schiff wrote:
>> I hope that this helps and I hope might be able to contribute to Maxima.
>>
>>
>> Thanks,
>> Conrad
> Let me throw some ideas about things i have been interested in recently
> related to maxima.
>
> Something which has been discussed several times here and could be worked on
> is adding the ability to do integrals resulting in elliptic functions. Code in
> partially working state has been shown in the mailing list by Prof. Fateman
> and R. Toy, if i remember well. The mathematics of this game are completely
> straightforward, very easily accesssible, and i suppose it is a good problem
> to learn the maxima insides.
>
> Another subject which is more related to numerical analysis is to investigate
> if one could devise something systematic to directly compile the Fortran
> programs used in maxima (lapack, etc.) and link them into maxima. Apparently
> this is somewhat lisp specific, but it seems that most free systems use
> sbcl nowadays, so this should be a good starting point. The problem is that
> the conversion of fortran to lisp followed by lisp compilation produces poor
> performance, and one gets better experience with scientific python, for
> example.
If you assume SBCL, then you can use its foreign function interface
http://www.sbcl.org/manual/Introduction-to-the-Foreign-Function-Interface.html#Introduction-to-the-Foreign-Function-Interface
to directly link to FORTRAN.
On the other hand, SBCL support for Windows, according to this page
http://www.sbcl.org/platform-table.html
is "port in progress" so it appears SBCL is not supported on the
operating system
used by the vast majority of Maxima users.
Another possibility is to examine UFFI to see if that can be used with
most of the common lisps.
There may be some objection from some people to the idea of having
FORTRAN code compiled into
binary somehow included in Maxima. I think it is worth it, not to deny
the possibility of difficulties regarding
which FORTRAN compiler etc etc. I dislike the idea of relying on awk,
perl, make ... all of whose functions should be done in Common Lisp...
>
> On the same theme, all these fortran programs are very old and assume that
> "double precision" is the ultimate end of scientific computation precision.
> However in many computations nowadays, double precision is dramatically
> insufficient. Fortunately maxima has "big floats" so that computations
> entirely done in maxima can bypass the precision problems. But this rules away
> all the converted fortran code.
Not all. Some code should work fine.
> For example you can diagonalize big matrices
> with the help of the fortran routines, but the result is essentially random,
> however it is obtained rapidly. If the matrix is symmetric you can use
> eigens_by_jacobi, written in lisp, which i think supports bigfloats, and
> get correct results but at great length of time. Finally a well known
> algorithm which is not implemented at all in maxima for the computation of
> eigenvalues of big matrices is Arnoldi with restart. The Fortran program is
> available.
Studying what Mathematica does (or purports to do) may help.
The issue for bigfloat code is often that the algorithm needed when the
required
precision is not known until the subroutine is called is entirely
different from the algorithms for a fixed precision known far in advance.
>
>
> Another approach to these questions is to export the computation to external
> programs in fortran or C. To this aim there exists the program gentran
> in share/contrib. It was broken in modern maxima, but it has been partially
> repaired recently. I think it still needs work, for example i think the
> conversion to fortran works but the conversion to C doesn't. It should be
> rather easy to locate the correction which have been applied to the fortran
> producing code, and do the same in the C producing code. The problem is that
> gentran is written in some old dialect of lisp which needs to be modernized.
> Then it would be nice and useful to play a bit with gentran and produce some
> good documentation.
>
>
>
I think we should have a place where suggested projects are collected.
Is this something for the Maxima wiki?
RJF