Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ogicse!unmvax!ariel.unm.edu!news From: john@ghostwheel.unm.edu (John Prentice) Newsgroups: comp.lang.fortran Subject: f2c for numerical Fortran conversion Message-ID: <1990Dec5.001924.11786@ariel.unm.edu> Date: 5 Dec 90 00:19:24 GMT Sender: news@ariel.unm.edu (USENET News System) Organization: University of New Mexico Math Dept., Albuquerque, NM Lines: 26 In talking with people via e-mail concerning the use of f2c to convert Fortran mathematical routines to C, the primary concern seems to be in the efficiency of the converted code. It would be interesting to take some generic math routine, say a code to calculate Bessel functions, and run it through f2c. Then do a speed comparison between the Fortran and C versions using compilers that generate good code. This sort of test would answer alot of my concerns about whether f2c can do this kind of conversion or whether the resulting code would require alot of rewriting. I am not that good a C programmer, anyone else want to give it a try? I would be happy to provide a Fortran math routine. Beyond that, has anyone ever considered running an entire library (say SLATEC) through f2c and then seeing if it still works. Considering that these libraries often won't even compile when moving them from compiler to compiler in Fortran, I wonder how successful a simple f2c conversion would be. Another point that worries me in using any type of automatic Fortran to C converter. Alot of these standard libraries have code in them which is rather sensitive to the order of operations, the word length, etc... How well does something like f2c preserve the numerical properties of the Fortran coding? Could one feel confident about this point? Perhaps one of the f2c development people could speak to that question. Thanks, John Prentice Amparo Corporation john@unmfys.unm.edu Brought to you by Super Global Mega Corp .com