# ThorkilNaursToys/GammaFunction

Spring til navigationSpring til søgning

In the spring of 1974, I worked on some implementations of the Gamma function which is a generalization of the factorial function: For integer x,

Γ(x) = (x-1)!

where

n! = 1 * 2 * 3 * ... * n.

For general x,

$\Gamma (x) = \int_{0}^\infty t^{x-1}e^{-t}\,\mathrm{d}t$

Implementations were for GIER in Algol/SLIP and for the Olivetti Programma P101. Scanned copies of the surviving materials are:

• media:GammaFunctionPaper.pdf: The paper describing the method used: Helmut Werner & Robert Collinge, "Chebyshev approximations to the Gamma function," Math. Comp., v. 15, 1961, p. 195-197. Notice the handwritten date "1974 marts 4".
• media:GammaFunctionAlgolSlip1.pdf: Gamma function as Slip machine code body of Gier Algol procedure.
• media:GammaFunctionAlgolSlip2.pdf: Gamma function as inline Slip machine code in Gier Algol procedure. This looks like an earlier version of the code. The hard-to-read line that is divided between the two pages of the document reads "E10:GRF PA4,QQ0".
• media:GammaFunctionPlot1.pdf: Plot of the Gamma function: Output from a test Algol program run on the Aarhus University Gier. The Algol test program has apparently not survived.
• media:GammaFunctionNotes.pdf: Handwritten program sketches. The Algol program shown is apparently for converting the approximation coefficients from the representation used in the paper (like 0.42278 43351 02334 79) to the integer representation (like 232428146243) used in the SLIP code: A multiplication by 2^39 is carried out in a multiple precision decimal representation. The reason for doing this is presumably an attempt to preserve some accuracy, but my guess is that it really doesn't gain anything and that the paper representation might as well have been used directly.
• media:GammaFunctionProgramma101A.pdf: I read this paper tape for the Olivetti Programma P101 as showing the program and approximation coefficients being typed in and listed. It looks like an incomplete session. Please be aware that paper tape contents is distributed over multiple pages and overlaps in some cases.
• media:GammaFunctionProgramma101B.pdf: This paper tape for the Olivetti Programma P101 looks like the finished program. As I read this, the program is actually distributed over two magnetic cards. The last part of the paper tape shows the program being tested, computing Γ(1.4616321450) = 0.8856031943 (the minimum value), Γ(3) = 2, Γ(4) = 6, and Γ(-0.2361) = -5.1137374454.
• media:GammaFunctionProgramma101C.pdf: This paper tape for the Olivetti Programma P101 shows the conversion of the approximation coefficients, mentioned under the above comments to the handwritten program sketches. Apparently, the conversion was carried out by a program (not preserved) for the Olivetti Programma 101 and not by the Algol program.
• media:GammaFunctionProgramma101D.pdf: This paper tape for the Olivetti Programma P101 shows the approximation coefficients for the Gamma function.