Re: C vs. Fortran (half OT questions)



In article <Rd2dndWu6ZWM4PzRnZ2dnUVZ7v6dnZ2d@xxxxxxxxxxxx>, comp@xxxxxx
says...

Hi all,
I've been always told of the C language as the best choice
to accomplish any kind of task in numerical algorithms implementation.
I'd like to do some serious programming in numerical analysis and
I'd like to read some opinion about whether C has too many limitations
or it is far a better choice than Fortran is. I have some questions
that may seem trivial and not topical to this group (I'll post the same
questions in comp.lang.fortran as well, I promise). Here they are:

1 -- is there any reason not to learn Fortran (a new language for me)
and focus on C (and C numerical libraries) potentialities?

If you don't want to learn Fortran, then don't bother. Most serious
numerical work is done in Fortran (look for Geophysics, weather, etc.
source code like NCAR...) but C++ is about as good and you can do good
work in C if you are careful.

C is not a bad language for numerical work.

2 -- is Fortran considered the best choice in this field only because
of its construct and syntax that makes easier to handle
mathematical entities?

Array handling is much better. The latest Fortran versions have OO
capabilities. Because of templates, C++ is a serious contender and more
and more high performance work is being done in C++.

3 -- what about the Standard IEEE 754 (IEC 60559:1989) conformance?
is that intrinsecal to the language or the implementation?
which language can offer a full support to the IEEE Standard,
C or Fortran?

It is optional in C, but most C compilers on IEEE capable platforms
support it.

4 -- what about performance? would you bet on C or Fortran? :-)

Probably, the difference is not going to be very important.

I see it as boiling down to this:
If you have a numerical project and you are a C expert, then do the
project in C (unless the customer does not have C resources).

There are high efficiency numerical projects in C (fftw, Atlas spring to
mind).

In the final analysis, the algorithms chosen are going to make a lot
more difference than the language chosen. If you are a C expert, then
the time you would spend learning Fortran and coming up to speed is
probably going to be problematic for a current project. But I see no
reason not to enjoy learning a new language unless you are not
interested in that.

.



Relevant Pages

  • Re: CALL for attention and discussion: recent paper comparing an equation solver implementation in F
    ... faced with Fortran, "Three issues specific to Fortran that resulted ... If and when this feature is added to the language I hope that the experience from C++ and other languages is taken into account - C++'s template mechanism operates at a level that is marginally above dumb token substitution. ... Existing code bases are also often subject to coding standards based on the available language capability at the time the code base was commenced and there is considerable inertia associated with revision of those coding standards. ... "New" libraries written for the current standards and current compiler capability use new language features. ...
    (comp.lang.fortran)
  • Re: Surprise
    ... haven't seen any Fortran libraries that do that. ... Libraries are a huge part of the reason why one language would be ...
    (comp.lang.fortran)
  • Re: interpretive vs. compiled
    ... for specific needs in FORTRAN. ... Nowadays, workstations are also available to engineers, and there's no ... Excel/VBA and much less exposure to programming. ... colleges are wondering what language to use in classes. ...
    (comp.programming)
  • Re: one-liner for characater replacement
    ... convert to another language. ... upgrade to upward compatible versions of the same language. ... Under the above rules of the game, unless the Fortran world announces ...  The user base has not shrunk all that much. ...
    (comp.lang.fortran)
  • Re: Help from fellow Fortran Users
    ... and Fortran in which he introduced the subject of Pascal, ... Pascal is a useful, high-level, portable language that is easy to use ... Inasmuch as his comments considered extensions for Pascal in the '70s, ... standard differs from ...
    (comp.lang.fortran)