Year: 2016

Multidimensional Linear Interpolation (Part 2)

In an earlier post, I mentioned that we needed an object-oriented modern Fortran library for multidimensional linear interpolation. Well, here it is. I call it finterp, and it is available on GitHub. It can be used for 1D-6D interpolation/extrapolation of data on a regular

Tagged with: , ,

Numerical Differentiation

I present the initial release of a new modern Fortran library for computing Jacobian matrices using numerical differentiation. It is called NumDiff and is available on GitHub. The Jacobian is the matrix of partial derivatives of a set of \(m\) functions

Tagged with: , , , ,

GOTO Still Considered Harmful

For a number of years I have been familiar with the observation that the quality of programmers is a decreasing function of the density of go to statements in the programs they produce. — Edsger W. Dijkstra One of the classics

Tagged with: ,

Fortran at 60

Today marks the 60th anniversary of the release of the original Fortran Programmer’s Reference Manual. Fortran was the world’s first high-level computer programming language, was developed beginning in 1953 at IBM by a team lead by John Backus. The first compiler was

Tagged with:

Computing Pi

The digits of can be computed using the “Spigot algorithm” [1-2]. The interesting thing about this algorithm is that it doesn’t use any floating point computations, only integers. A Fortran version of the algorithm is given below (a translation of the Pascal program

Tagged with: , ,

Backward Compatibility

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” — Antoine de Saint-Exupéry The Fortran standards committee generally refuses to break backward compatibility when Fortran is updated. This is a good

Tagged with:

Syntax Highlighting

Decently syntax highlighted Fortran code on the internet is hard to come by. None of the major sites where people are likely to visit to learn about Fortran have it: The Google Groups hosting of comp.lang.fortran (I don’t really expect much from

Tagged with:

Intel Fortran Compiler 17.0

Intel has announced the availability of version 17.0 of the Intel Fortran Compiler (part of Intel Parallel Studio XE 2017).  Slowly but surely, the compiler is approaching full support for the current Fortran 2008 standard. New Fortran 2008 features added in this release are: TYPE(intrinsic-type) Pointer initialization

Tagged with: ,

JSON-Fortran 5.1

JSON-Fortran 5.1 is out. There are several new features in this release. I added a get_path() routine that can be used to return the path of a variable in a JSON structure. This can be used along with the traverse() routine

Tagged with: , ,

Dynamically Sizing Arrays

Often the need arises to add (or subtract) elements from an array on the fly. Fortran 2008 allows for this to be easily done using standard allocatable arrays. An example for integer arrays is shown here: Note that, if using

Tagged with:
Top