Re: f2cl problem with maxima slatec routines



>>>>> "David" == CALCRTS   writes:

    David> I have been working on Airy functions for complex numerical values
    David> using the SLATEC routines in maxima.  Some of the translated code
    David> looks wrong, as the subroutines return (values nil nil nil ... nil).
    David> (This is with the translated code in maxima CVS, but the latest 
    David> f2cl gives the same result).

    David> For example zseri.lisp and zbinu.lisp need to following changes to
    David> work.  There are some other cases as well, but it is bed time here.

This might be ok, but could also be a bug in f2cl.

Since Fortran is pass-by-reference but Lisp is pass-by-value, f2cl
makes the lisp function return all the args, in case they were
modified in the routine.  However, it tries to be smart and if some
arg wasn't modified, it returns nil as a signal to the caller that
nothing needs to be done.  (It also allows smart compilers to remove
some unneeded work.)

>From the brief description for zseri, only yr, yi, and nz are
modified.  Everything else is an input.  Since yr and yi are arrays,
the array elements are modified so everything is ok, and we don't need
to return yr and yi.  nz is an integer, and is modified, so zseri.lisp
does return nz (buried in that list of nils).

What exactly do you see and how is it failing?

Ray