From: jm59@prism.gatech.EDU (MILLS,JOHN M.)
Newsgroups: comp.lang.pascal
Subject: Re: Numerical Analysis on a PC-languages
Date: 15 Oct 92 14:52:13 GMT
Organization: Georgia Institute of Technology


In article <1992Oct13.182105.1629@magnus.acs.ohio-state.edu> regeorge@magnus.acs.ohio-state.edu (Robert E George) writes:
 >We want to write numerical analysis programs (mainly integrations) on a
 >486DX 33 MHz pc. There are several options as far as languages:
 >
 >     (1) Turbo Pascal 5.5 (what we currently use)
 >     (2) Microsoft FORTRAN
 >     (3) Microfsoft FORTRAN for Windows
 >(...but these are those we feel comfortable with.)
 >     (4) Microsoft C (not comfortable with, willing to learn if dramatically
 >                      superior to (1)-(2)-(3)  )
 >Any suggestions on which is best?  (Execution speed??)
 >
 >Please email suggestions.

This could be an interesting thread, so I'm taking the liberty of posting my
comments.

I would not base the decision on the language qualities _per_se_, but on those
parts of the package I would _not_ have to write.  Naturally that's not
much help if your interest is writing the package rather than using it
for computation [8*>).

As a university, we obtained (and still have, I believe) a site license 
for the 'tried and true' Math/Science FORTRAN source; we can download and
compile it into our programs, but it is BIG.  This is a thoroughly tested
and accepted package.  Is it available to you?

I have not used it, but have excellent reports from users of Lahey FORTRAN
under DOS, expecially when dealing with _large_ arrays (eg, in computing
E-M fields near antennas).

I have the TurboPascal Numerical Methods toolbox.  Lots of examples and the
routines are small. (I found some examples falsely trap on GetMem with error
type 0 -- I presume this is a difference between TP 4.0 vs. later TP compilers.
Just a tip -- I ground my teeth for a while before figuring out why I could
run the FFTDEMO, but _not_ recompile it. [8*<).

The TP NM toolbox claims ancestry in the Press, Flannery, Teukolsky and
Vettering _Numerical Recipies..._ series, and I understand their Pascal
source is PD from SIMTEL mirrors.  You can also buy that book, disk and an
accompanying example disk from the publisher.  This package exists in C,
and I have it, though I haven't used it yet. The authors specifically
disclaim any responsibility for the validity or consequences of using their
code.  This package also exists in FORTRAN.  DOS version is reasonably
cheap, others less so.  Porting is specifically prohibited.

There may also be licensing problems in incorporating compiled _Numerical
Recipies_ materials, or in quoting source code for publication. 
Ask before you distribute.

The bottom line (for me) is that the work of (1) writing and (2) validating
a numerical methods package is sufficient that I would avoid it if possible.
My choice of a standard package would then drive my compiler (and platform)
selection.

Hope that was worth the bandwidth.

Regards -- jmm --

How 'bout them BRAVES?

-- 
John M. Mills, SRE; Georgia Tech/GTRI/TSDL, Atlanta, GA 30332
uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!jm59
Internet: jm59@prism.gatech.edu
 "f U cn rd dis, U mst uz Unix!!!"  ...jaw