f2cl, cerlib, and maxima (Re: [Maxima] Release plans)



>>>>> "James" == James Amundson <amundson@fnal.gov> writes:

    James> I am not really sure what to do. For 6.1, I really had in mind the
    James> larger project of integrating special function code from other sources.
    James> What to do in the meantime is not clear. Would it be easy to switch the
    James> cernlib code for what we have now? The code you added is much better
    James> than what we had before. It would pain me to just dump it for what we
    James> had before.

I finally took at look at cernlib this weekend.  I think it will work,
but does require some manual work.

First, the code expects the C preprocessor to be run to select the
desired pieces of code.  Not a big deal, but I've only looked at the
erf code.

Second, some of the code uses Fortran ENTRY statements (multiple entry
points into a routine).  f2cl doesn't handle that.  Fortunately, for
erf, it's quite easy to make the one line change necessary in either
Fortran or Lisp.  I think I know how to make f2cl handle simple ENTRY
statements, but I'm not sure I want to do that.  A bit of work.

Third, the erf Fortran code breaks f2cl. :-(  I know the problems and
have a handle on them.  Definite bugs in f2cl.

On a side note, f2cl has enough information to generate automatically
an appropriate FFI expression to feed to your favorite FFI.  (Entry
statements, excepted!)  Could be useful for integrating Fortran libs
into maxima without having to create the FFI by hand.

Ray