# Algol libraries

**URL:** <https://fortran-lang.discourse.group/t/algol-libraries/10890>\
**Category:** Uncategorized\
**Created:** [May 5, 2026, 6:40pm UTC](https://fortran-lang.discourse.group/t/algol-libraries/10890 "2026-05-05T18:40:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beliavsky](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Post date:** [May 5, 2026, 6:40pm UTC](https://fortran-lang.discourse.group/t/algol-libraries/10890/1 "2026-05-05T18:40:35Z")

</div>

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](https://chatgpt.com/share/69fa37de-512c-8330-bfb2-085bb7a9be2d).

---

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [May 5, 2026, 7:44pm UTC](https://fortran-lang.discourse.group/t/algol-libraries/10890/2 "2026-05-05T19:44:53Z")

</div>

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](https://craftofcoding.wordpress.com/2017/03/06/a-brief-look-at-the-utter-madness-of-algol-68/)
- [Why Algol 68 was weird (and ultimately failed)](https://craftofcoding.wordpress.com/2017/06/14/why-algol-68-was-weird-and-ultimately-failed/)
- [The Swiss Army Knife Syndrome and ALGOL 68](https://craftofcoding.wordpress.com/2021/03/19/the-swiss-army-knife-syndrome-and-algol-68/)
- [The Wirth Trinity – Pascal](https://craftofcoding.wordpress.com/2021/04/28/the-wirth-trinity-pascal/)
- [Algol-68 seemed like a good idea – until it wasn’t](https://craftofcoding.wordpress.com/2024/10/21/algol-68-seemed-like-a-good-idea-until-it-wasnt/)

Here is an Algol 60 procedure for back-substitution using the LU factorization of a banded matrix:

```auto
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,

- `n` order of the band matrix `A - lambda I` which has been factorized using  
`bandet1`.
- `m1` number of sub-diagonal lines in A.
- `m2` number of super-diagonal lines in A.
- `e` parameter which modifies the procedure for use in inverse iteration
- `r` number of right-hand sides.
- `a` upper-triangle of factorization of `A - lambda I` as given by `bandet1`.
- `m` lower-triangle of factorization of `A - lambda I` as given by `bandet1`.
- `int` an array giving details of pivoting as provided by `bandet1`.
- `b` on input an `n × r` array consisting of the `r` right-hand sides; on output consists of the `r` solutions

Source: [Solution of symmetric and unsymmetric band equations and the calculation of eigenvectors of band matrices | Numerische Mathematik | Springer Nature Link](https://doi.org/10.1007/BF02162421)

The LAPACK routine serving a similar purpose, but with a different banded matrix format, is [`?GBTRS`](https://www.netlib.org/lapack//explore-html/d1/dd7/group__gbtrs.html).

---

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [May 5, 2026, 7:55pm UTC](https://fortran-lang.discourse.group/t/algol-libraries/10890/3 "2026-05-05T19:55:06Z")

</div>

The Mathematical Centre in Amsterdam, Netherlands, hosts a digital archive of mathematical reports, many of them using Algol 60 and Algol 68:

> **[Centrum Wiskunde & Informatica:
  Stichting Mathematisch Centrum. Numerieke...](https://ir.cwi.nl/col/1031#filter=all:algol%2068)**

---

<div class="post-metadata">

**Author:** ![rwmsu](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@rwmsu](https://fortran-lang.discourse.group/u/rwmsu)\
**Post date:** [May 5, 2026, 8:07pm UTC](https://fortran-lang.discourse.group/t/algol-libraries/10890/4 "2026-05-05T20:07:54Z")

</div>

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](https://calgo.acm.org/). Plus I think most if not all of the ACM articles etc are now Open Access (but I could be wrong).

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [May 6, 2026, 8:40am UTC](https://fortran-lang.discourse.group/t/algol-libraries/10890/5 "2026-05-06T08:40:17Z")

</div>

You are not wrong, most are indeed open-access.
