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.

.