[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is Linux Unix?



Paul E Condon <pecondon@mesanetworks.net> wrote in message news:<2ly2q-8n-1@gated-at.bofh.it>...
> On Fri, Jul 23, 2004 at 07:54:12PM -0700, Ryo Furue wrote:
> > ... I haven't used the GNU Fortran 95, but I'm 98% sure that it's almost
> > unusable at this stage.  Since I've had *enough* unpleasantness with new
> > compilers, I'm very reluctant to give the GNU compiler a try at this stage.
> 
> Is your program concerned with a scientific question? What area of science?

Physical oceanography.  My colleagues are meteorologists and oceanographers.
Some of us numerically solve partial differential equations for fluid motions
(That's the same type of computation for numerical whether prediction) and
analyze the result.  Others analyze observational data.  Most of us use
Fortran.

> Could you share your code with me and let
> me see what I can make of it using GNU Fortran?

Do you mean that you would test my code with the new GNU Fortran 95 compiler?
I'd certainly appreciate it, but I don't know if you really want to bother.

> > That's out of question! :)  For numerical computation, Fortran 95 is "better"
> > than C++. (I have plenty of experience in C++ programming.)  Sure I greatly
> > miss C++'s objects and templates and other goodies.  But codes for numerical
> > computation can be much more "easily" written in Fortran 95.  That's the most
> > important point for a non-proffessional programmer like me.
> 
> I, also, am a non-professional programmer. Some things are surely more
> compact in Fortran than in C/C++, but the floating point in both F and
> C is surely IEEE standard by now. Or is there some reason for
> preferring some other type of floating point that is still available
> in IFC?

Um, floating points of any modern Fortran compiler are IEEE.  Whether you does
your calculation in C++ or in Fortran won't matter in terms of floating point
arithmetics.  The only exception you find these days is Cray.

> But I'm interested in investigating in a somewhat serious way, the
> actual differences, today. [. . .]

I think that the main difference between C++ and Fortran is NOT the speed
or accuracy of floating point calculations.  You can write as fast code in
one language as in the other.  The most important thing for me is that you
write "easy" Fortran code without thinking much about the speed and compile
it, and then the resultant code runs "reasonably" fast.   In C++, you can't
write "easy" code that uses multidimensional arrays (Please see my other
posting which details on the difference).

And the resultant C++ code may run slower.  Perhaps it will.  I don't
see any reason why the code in C++ will run faster for the type of code
I showed in the other posting of mine, whereas I see a few reasons why
the C++ counterpart may run slower. I'm sure you can write as fast code
in C++ as in Fortran.  The point is how much work you need to achieve
that goal. That's why I said I'm not a professional programmer.  If you
are a professional programmer, you can put more of your energy to make
the code fast in any lanugage.

Finally, I'm not saying Fortran is better in all type of programming.
I'd like C++ better in different problems.  But, then, in my situation,
I don't have problems better solved in C++ than in Ruby or in Bourne
shell.  So, if not Fortran 95, I use Ruby or Bourne shell.

Cheers,
Ryo



Reply to: