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


Groups > comp.programming > #8687 > unrolled thread

C and fortran, math power

Started by"Bill Cunningham" <nospam@nspam.invalid>
First post2018-04-21 16:37 -0400
Last post2018-04-23 18:08 -0700
Articles 4 — 4 participants

Back to article view | Back to comp.programming


Contents

  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

#8687 — C and fortran, math power

From"Bill Cunningham" <nospam@nspam.invalid>
Date2018-04-21 16:37 -0400
SubjectC and fortran, math power
Message-ID<pbg7ej$er$1@dont-email.me>
    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.

Bill

[toc] | [next] | [standalone]


#8692

Fromcross@spitfire.i.gajendra.net (Dan Cross)
Date2018-04-22 13:18 +0000
Message-ID<pbi22b$ch8$1@reader1.panix.com>
In reply to#8687
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.

[toc] | [prev] | [next] | [standalone]


#8695

FromEd Prochak <edprochak@gmail.com>
Date2018-04-23 08:32 -0700
Message-ID<73887dd1-42b7-46d9-8e36-3de6822dfdc4@googlegroups.com>
In reply to#8692
On Sunday, April 22, 2018 at 9:18:06 AM UTC-4, Dan Cross wrote:
> 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.

I second Dan's reason for learning FORTRAN:
> 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.

While it is not my discipline, I believe FORTRAN is still a key
language for mathematical modeling in stress analysis. If you
are interested in free software, there is a lot of FORTRAN available
from NASA on many applications.

HTH,
  Ed

[toc] | [prev] | [next] | [standalone]


#8699

FromChad <cdalten@gmail.com>
Date2018-04-23 18:08 -0700
Message-ID<ad0b6cdb-b47e-47b9-b833-35dd10759ae9@googlegroups.com>
In reply to#8695
The school that I briefly attended to back in the mid 90s made required all pre engineering students to take and pass a semester of FORTRAN. At this same school, the College of Mechanical Engineering had this heuristic facility layout programming written in FORTRAN.

The kicker being that in both cases, this was all being done a black and orange terminal that was connected to a VAX. And I'm not talking about the pos ones that Compaq tried to sell after they acquired DEC. I'm talking about the huge computer that sat behind a fence which had a high voltage warning sign. It's the same system were a user was allocated like 2000 blocks of memory and the circuit boards inside that machine were as big as the ones made by Unisys for the military.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web