Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!nrl-cmf!ukma!rutgers!rochester!uhura.cc.rochester.edu!ur-valhalla!davis
From: davis@galaxy.ee.rochester.edu (Al Davis)
Newsgroups: comp.lang.fortran
Subject: Re: Fortran versus C for numerical anal
Summary: numerical analysis, when applied, becomes system programming
Message-ID: <1475@valhalla.ee.rochester.edu>
Date: 21 Sep 88 01:25:37 GMT
References: <1530@ficc.uu.net> <3746@lanl.gov> <14494@agate.BERKELEY.EDU>
Sender: usenet@valhalla.ee.rochester.edu
Reply-To: davis@ee.rochester.edu (Al Davis)
Organization: UR Dept. of Electrical Engg, Rochester NY 14627
Lines: 41


In article <14494@agate.BERKELEY.EDU> link@stew.ssl.berkeley.edu (Richard
Link) writes:
>Having taught numerical analysis to senior physics students, let me
>say that the choice of language is not all that important.

>Numerical analysis, for better or worse, is virtually synonymous with
>FORTRAN. Very few IMPORTANT mathematical packages have been written
>in other languages and then ported to FORTRAN; the opposite is the
>rule - serious scientific programming is done in FORTRAN. Period.
 
True, but why?  Numerical analysis is mostly done in FORTRAN for historical
reasons.  Once the research is done, the new methods are put to use.  While
FORTRAN may be adequate for the pure numerical problem, it is often not for
the complete problem to be solved using the new method.  A complete
application is more like system programming.  Even in programs that seem to
be mostly numerical, most of the code deals with user interface, i/o
processing, etc.  The same program must run on a minimal system, (example:
256k memory) and without recompiling support a loaded system (example:
megabytes of memory).  The same source must, without changes, work on an IBM
PC and a Cray.

>I have yet to discover a single compelling reason to switch from FORTRAN
>to C, other than "it's a more modern language". I am grateful for the fact
>that I did not endeavour to learn PL/I or Pascal on this specious basis.

If you don't know any other languages, how can you judge, never mind.

>Why don't we all save the bull on the net and try to use the most
>appropriate tool for the problem at hand?

Mixing languages is not portable.  C is a fair choice for many classes of
problems.  Fortran vs C for numerical analysis may be a religious argument
(if you consider the merits of structured programming a religious argument)
but when you cross the boundary, the choice is clear.

Here is a challenge: write a portable program that does LU decomposition of
a matrix of arbitrary size, in Fortran.  I believe it can't be done, in a
straightforward way.  (Read the input, do it, write the result)
Someone please prove me wrong.

Al Davis