Some math libraries were originally in Algol, more often Algol 60 than Algol 68, which is now supported by gcc. The Algol libaries were translated to Fortran 77, and sometimes from Fortran 77 to modern Fortran, but I wonder if translating from the original Algol to modern Fortran would make sense as a hobby project. ChatGPT answered some of my questions about Algol.
Michael Wirth from has a few posts about Algol 68 on his “Craft of Coding” blog:
- A brief look at the utter madness of Algol 68
- Why Algol 68 was weird (and ultimately failed)
- The Swiss Army Knife Syndrome and ALGOL 68
- The Wirth Trinity – Pascal
- Algol-68 seemed like a good idea – until it wasn’t
Here is an Algol 60 procedure for back-substitution using the LU factorization of a banded matrix:
procedure bansol1 (n,m1,m2) data: (e, r, a, m, int) data and result: (b);
value n, m1, m2, e, r; integer n, m1, m2, e, r; array a, m, b;
integer array int;
comment When e = 0 this procedure solves (A-lambda*I)x=b,
where A is a band matrix of order n and (A - lambda*I)
has previously been factorized using bandet1. Here, b is an
n * r matrix consisting of r right-hand sides. Each right-
hand side requires one forward substitution and one back-
substitution. When e = 1, a back-substitution only is used.
This varient should be used as the first step in inverse
iteration for the eigenvector corresponding to lambda;
begin integer i, i, k, l, w;
real x;
l := m1;
if e = 0 then
for k := 1 step 1 until n do
begin i := int[k];
if i /= k then
for j:= 1 step 1 until r do
begin x:=b[k,j]; b[k,j]:=b[i,j]; b[i,j]:= x
end j;
if l < n then l:=l+1;
for i:=k+1 step 1 until l do
begin x:= m[k,i-k]
for j:=1 step 1 until r do
b[i,j] := b[i,j] - x * b[k,j]
end i
end k
for j:= 1 step 1 until r do
begin l:=-m1
for i:=n step -1 until 1 do
begin x:=b[i,j]; w:=i+m1;
for k:=1-m1 step 1 until l do
x := x - a[i,k]*b[k+w,j];
b[i,j] := x/a[i,-m1];
if (l<m2) then l:=l+1
end i
end j
end bansol1
The dummy arguments of the function are,
norder of the band matrixA - lambda Iwhich has been factorized using
bandet1.m1number of sub-diagonal lines in A.m2number of super-diagonal lines in A.eparameter which modifies the procedure for use in inverse iterationrnumber of right-hand sides.aupper-triangle of factorization ofA - lambda Ias given bybandet1.mlower-triangle of factorization ofA - lambda Ias given bybandet1.intan array giving details of pivoting as provided bybandet1.bon input ann Ă— rarray consisting of therright-hand sides; on output consists of thersolutions
The LAPACK routine serving a similar purpose, but with a different banded matrix format, is ?GBTRS.
The Mathematical Centre in Amsterdam, Netherlands, hosts a digital archive of mathematical reports, many of them using Algol 60 and Algol 68:
I think there are some old ACM reports that have published ALGOL code in them. Some very early ALGOL 60 code is still available on the ACM CALGO site. Plus I think most if not all of the ACM articles etc are now Open Access (but I could be wrong).
You are not wrong, most are indeed open-access.