Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #8692

Re: C and fortran, math power

From cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups comp.programming
Subject Re: C and fortran, math power
Date 2018-04-22 13:18 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <pbi22b$ch8$1@reader1.panix.com> (permalink)
References <pbg7ej$er$1@dont-email.me>

Show all headers | View raw


In article <pbg7ej$er$1@dont-email.me>,
Bill Cunningham <nospam@nspam.invalid> wrote:
>    The thing about fortran is that it is so good with mathematics. Nowadays 
>with C's new stdint.h and complex.h and so on new headers, would it be worth 
>learning fortran? I guess I am asking for the opnions of those who know 
>both.

Among other reasons, due to the way that Fortran handles pointer
aliasing and due to its history as a language in which one wrote
high performance code, Fortran compilers are very good at
optimizing mediocre code.

For the opposite reasons, it is more difficult (though by no
means impossible) for C compilers to optimize as aggressively.
That said, the dominant C compilers these days do an excellent
job of producing object code that's performance-competitive with
Fortran.

Is it "worth it" to learn Fortran?  I think that really depends
on your definition of value....  I would argue that it's worth
learning any number of languages because breadth of exposure to
different programming paradigms and techniques gives one
perspective from which to deepen one's understanding of the
discipline of programming.  Learning Fortran certainly has merit
in this sense.

Whether you'd write new, producion-quality, HPC code in Fortran
is a different matter.  I think I'd largely argue against that
unless there was some other compelling reason: the target
audience for your program is Fortran-centric; you want to
leverage an existing body of Fortran code; you need some unique
property of a specific compiler [though this last one is highly
suspect], etc.

	- Dan C.

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

C and fortran, math power "Bill Cunningham" <nospam@nspam.invalid> - 2018-04-21 16:37 -0400
  Re: C and fortran, math power cross@spitfire.i.gajendra.net (Dan Cross) - 2018-04-22 13:18 +0000
    Re: C and fortran, math power Ed Prochak <edprochak@gmail.com> - 2018-04-23 08:32 -0700
      Re: C and fortran, math power Chad <cdalten@gmail.com> - 2018-04-23 18:08 -0700

csiph-web