{
  "id": "N-TPK-v1.2",
  "type": "report",
  "title": "Knuth and Trabb Pardo’s TPK, run: none of their three programs is accepted as printed",
  "author": [
    {
      "family": "Hay",
      "given": "Chris"
    }
  ],
  "issued": {
    "date-parts": [
      [
        2026,
        11,
        24
      ]
    ]
  },
  "URL": "https://chrishayuk.com/records/N-TPK/1.2",
  "publisher": "Chris Hay",
  "version": "1.2",
  "abstract": "Knuth and Trabb Pardo’s survey of early programming languages (1976) compares them by writing one fixed algorithm, TPK, in each, as “fairly close replicas” of what each language’s author would have written. This collection has executable reconstructions of nine early systems, each built from its own primary sources and independently of their paper. Three are languages they wrote TPK in, and each of those programs is refused as printed: Böhm’s, because it names a group S and a variable X, the letters his compiler keeps for itself, so compiled by his method it prints nothing; Laning and Zierler’s, because it reads its input with v|N, which the manual says “is not yet in operation”, and uses a computed zero as an index; ALGOL 60’s, because its procedure heading puts the specification before the value part, against the Report, and because the surviving X1 compiler, run on a simulator, stops on its label and compiles the heading’s parameter as a value array. Knuth had already corrected the heading in his errata (2014); the other findings were not found in a limited search. The six systems they did not cover give six kinds of answer: Turing’s ACE runs TPK only after correcting two of Turing’s own tables; GEORGE, IPL-V and JOSS accept it by their manuals; whether the first Dartmouth BASIC could run it cannot be settled from what survives; and the defining document of CPL cannot express it. Where they run, every value is right at the system’s precision but one, GEORGE’s 79.7062, traced to Hamblin’s add routine. On the two machine-level systems, output costs more than the arithmetic. A second input, with negative numbers, finds every program right in general but ours for JOSS, whose output form is too narrow, and shows that the X1 mode prints a stand-in’s digits for f(0)."
}