Miscellaneous FORTRAN programs

Most of these are in the public domain, others are under free licenses. One is for research only.


circular 1.2 Computes the circular mean or circular median (and standard deviation or mean absolute deviation) appropriate for quantities that wrap around, like time of day or compass direction. A similar program, cyclic.c (not an exact tranlation) is available in C. Also see the accompanying article on codeproject.com

Weighted circular mean or weighted circular median are available in FORTRAN and in C.

oscill.f Subroutine for frequency analysis of discrete events. Requires thrift.

thrift.f Rational Algebraic Function replacements for EXP, LOG, SIN, COS, and an arctangent.

imidiacy IMmediate MIDI - records keystrokes as muscial notes. In C, not FORTRAN. Also has a sourceforge page.

KASC Subroutines for k-means, asymmetric, and spectral clustering. Supports missing data. Has several hard-to-find features: supports circular data, as well as scalar, categorical, and logical variables. It can automatically detect an appropriate number of clusters and supports asymmetric dissimilarities. The code is basically good, but it's bloated with extra features and bugs. Maybe you can extract just what you need from it.

K-Means++ The simplest possible implementation of k-means data clutering. Also see the accompanying article on codeproject.com

MixMidi 0 Mix together MIDI files. Feature-complete, it still needs testing and documentation before it is ready for a formal release.

DET4 Determinant of a 4x4 matrix

GCD and LCD Euclid's algorithm for the greatest common divisor and the least common denominator.

Gauss-Jordan Elimination Solves systems of linear equations.

ucase.f Convert a string to upper-case letters

entropy.f Computes the Brillouin and DeMoivre-Shannon entropy indices.

Lanczos Eigenvector Algorithm This is a traditional version of the Lanczos algorithm. It's not fast or accurate, but it's brief and self-contained.

Stable sorting with merge sort for real numbers, and radix sort for integers.

navier.f Solution to a homework problem in John D. Anderson's Computational Fluid Mechanics: the Basics with Applications

Durstenfeld's Shuffle Makes a random permutation vector

spatial.f The spatial median.

bitsz.f Replacement for BIT_SIZE on old compilers (like f2c).

ltrim.f Replacement for LEN_TRIM on old compilers (like f2c).


fnv32.f Fowler-Noll-Vo 32 bit general-purpose hash function. Home page

poly.f Find an interpolating polynomial by the Bjorck-Pereyra algorithm.

By others:

graclus by Brian Kulis and Yuqiang Guan. Program for clustering graphs. KASC calls it. (in C.)

Praxis by Richard Brent, revised by John Chandler. Unconstrained optimization of a function of several variables.

Random Forests by Leo Breiman and Adele Cutler. Statistics software for classification and clustering. This is the original version. It was released under the GNU GPL, but the authors do not give permission for it to be used commercially, so please don't.

ARPACK By Sorensen, et. al. The ARnoldi PACKage for computing eigenvalues and eigenvectors of sparse matrices.

Hermitian Lanczos Package By Osni Marques. Computes eigenvalues and eigenvectors of sparse Hermitian matrices.

zeta.f Gamma function and Riemann Zeta function, from the CERN library.

trapfpe.c Code snippet to turn on error trapping for floating point exceptions. Finds hard-to-find bugs.

machine.f Replacements for EPSILON, TINY, and HUGE on old compilers (like f2c, g77)

Experimental Math

l1orth.f Orthogonalization, regression, and matrix factorization according to an L1 orthogonality criterion. Released for research only.

l1trig.f Compute the taxicab sine, taxicab cosine, and taxicab arctangent on a plane measured by the L1 norm.

multitrans.m Fourier analysis of .wav files according to triangle waves and flattop waves (the L1 and L-infinity circular functions) as well as the usual sinusoid waves. Color-coded spectrogram. In Matlab.

Boosted approximation Approximate a function by least squares fit, adding evaluation points where they are most needed. This is not necessarily the best way to solve the problem. It has not been compared to Chebyshev polynomials. Requires nswc.f

nystrom.f Estimate eigenvectors by the Nyström Extension. Requries nswc.f Don't know if it works or not.

erodil.f EROsion-DILation. Calculates a measure of surface roughness (what is claimed at times to be fractal dimension) by a simple version of the morphological covering algorithm.

dfa.f Detrended fluctuation analysis.

The U-Tree A universal tree. It allows an approximate nearest neighbor search on non-metric data. Exact on metric data.


Naval Surface Warfare Center (NSWC) Library Long (3.6 MB) collection of numerical subroutines in FORTRAN 66. Also comes with a manual.

SLATEC Library Sandia / Los Alamos National Laboratories numerical subroutine library. This version is from an old release of Debian GNU/Linux.

cmlib The National Bureau of Standards Core Mathematical Library . Edition of 1988, still available from NIST

CERN Mathlib Math subroutine library of the European physics laboratory, 2000 edition.

email: andy_a@users.sf.net
updated: 13 June 2017