# ALGOL 68 - Numerical Algorithm Library

From Rosetta Code

The best way to do "number crunching" in Algol 68 is to link to the GNU Scientific Library. An interface to GSL is built in to ALGOL 68G. However historically Algol 68 also had available the NAG Numerical Libraries.

## NAG - Numerical Algorithm Group Library[edit]

The chapters in the Algol 68 Mark 3 Library - with Rosettacode equivalents.

- A02: Complex Arithmetic - Arithmetic/Complex & Roots of unity
- A04: Extended Arithmetic - Long multiplication & Lucas-Lehmer test
- C02: Zeros of a Polynomial - Nth root & Roots of a quadratic function
- C05: Roots of One or More Transcendental Equations - None
- C06: Summation of Series - None
- D01: Quadrature - Numerical integration
- D02: Ordinary Differential Equations - None
- D04: Numerical Differentiation - None
- D05: Integral Equations - None
- E01: Interpolation - None
- E02: Curve and Surface Fitting - Forward difference & Polynomial regression
- E04: Minimising or Maximising a Function - None
- F01: Interpolation - None
- F02: Eigenvalues and Eigenvectors - None
- F03: Determinants - None
- F04: Simultaneous Linear Equations - Reduced row echelon form
- F05: Orthogonalisation - None
- G01: Simple Calculations and Statistical Data - Arithmetic evaluation, Arithmetic/Integer, Arithmetic/Rational, Averages/Pythagorean means, Averages/Root mean square, Averages/Simple moving average, Bitwise operationsArray Initialization, Combinations, Creating an Array, Exponentiation operator, Factorial, Factors of a Mersenne number, Fibonacci sequence, Greatest common divisor, Integer comparison, Miller-Rabin primality test, Non-decimal radices/Convert, Non-decimal radices/Output, Perfect numbers, Primality by trial division, Prime decomposition & Seven-sided dice from five-sided dice
- G02: Random Number Generators - Monte Carlo methods & Random numbers
- G05: Correlations and Regression Analysis - Polynomial regression
- H: Operations Research - Knapsack problem/Unbounded
- M01: Sorting - Binary search, Sort an integer array, Sorting algorithms/Bogosort, Sorting algorithms/Bubble sort, Sorting algorithms/Cocktail sort, Sorting algorithms/Counting sort, Sorting algorithms/Gnome sort, Sorting algorithms/Insertion sort, Sorting algorithms/Merge sort, Sorting algorithms/Selection sort & Sorting algorithms/Shell sort
- P01: Error Trapping - Assertions, Detect division by zero, Exceptions & Exceptions/Catch an exception thrown in a nested call
- S: Approximations of Special Functions - Gamma function, Standard deviation & Trigonometric functions
- T01: Vector and Matrix Operations - Matrix-exponentiation operator, Matrix multiplication & Matrix transposition
- X02: Machine Constants - Boolean values, Infinity, Literals/Integer & Real constants and functions
- X03: Inner Products - Jensen's Device, Sum and product of an array, Sum of a series & Sum of squares

Algol 68 Platforms supported CDC 7600/CYBER (CDC ALGOL 68), IBM 360/370/AMDAHL (FLACC ALGOL 68), ICL 1900 (ALGOL 68R), ICL 1906A/S (ALGOL 68R) & ICL 2900(8) (ALGOL 68RS) and Telefunken TR440 (ALGOL 68C)