[comp.lang.fortran] f2c for math packages

john@ghostwheel.unm.edu (John Prentice) (12/04/90)

The following note appeared in sci.math.num-analysis today.

>  I am looking for a C version of the SLAP package of netlib.
>  I tried already the f2c translator for it but the result is too
>  machine dependent for my purpose (actually, it is not the translated code 
>  itself but the f2c libraries that are neccessary for it that require an 
>  individual installation on every machine).

I thought this was interesting considering the suggestions recently in
the Fortran versus C debate that f2c solves the problem for C programmers
of the big math libraries being written in Fortran.  I have not talked to
the person who posted this, so I don't know the specifics.  There may be
unusual circumstances or perhaps there is a simple solution.  What I wanted
to illustrate however is that clearly there are numerical programmers out
there who are not finding f2c suitable for translating the math libraries
into C.  That is not to dump on f2c!  However, a little realism about its
capabilities is perhaps in order.  What can one really expect to be able
to do with f2c in translating Fortran mathematical packages into C, what
are its limitations, how hard is it for the non-C or non-Unix guru to use,
and how efficient is the resulting implementation?  Please post any 
responses to the newsgroup since there is a wide audience for this topic.

John Prentice
john@unmfys.unm.edu 

york@altger.UUCP (york) (12/07/90)

I used f2c to translate a program of about 40000 lines of standard
F77 code (numerical analysis, graphics) and had no problems
with it. The package includes COMPLEX statements and
COMMON blocks.