main-content

## Über dieses Buch

The idea for this book grew out of proposals at the APL86 con­ ference in Manchester which led to the initiation of the I-APL (International APL) project, and through it to the availability of an interpreter which would bring the advantages of APL within the means of vast numbers of school children and their teachers. The motivation is that once school teachers have glimpsed the possibilities, there will be a place for an "ideas" book of short programs which will enable useful algorithms to be brought rapidly into classroom use, and perhaps even to be written and developed in front of the class. A scan of the contents will show how the conciseness of APL makes it possible to address a huge range of topics in a small number of pages. There is naturally a degree of idiosyncrasy in the choice of topics - the selection I have made reflects algo­ rithms which have either proved useful in real work, or which have caught my imagination as candidates for demonstrating the value of APL as a mathematical notation. Where appropriate, notes on the programs are intended to show the naturalness with which APL deals with the mathematics concerned, and to estab­ lish that APL is not, as is often supposed, an unreadable lan­ guage written in a bizarre character set.

## Inhaltsverzeichnis

### Chapter 1. Introduction

Abstract
This compendium is designed to provide mathematics teachers with a wide range of mathematical programs of relevance to current syllabuses. A further aim is to provide these in small bulk, the combination of breadth and conciseness being achieved through use of APL which allows many mathematical algorithms to be expressed in a fraction of the number of statements that are required in other languages, thereby allowing the programming language to be truly subservient to the mathematics.
Norman D. Thomson

### Chapter 2. Arithmetic and Numbers

Abstract
The index generator ≀ is a versatile tool for generating regular sets of integers, for example
First R positive integers
R
First R even integers
2×≀R
First R multiples of L
L×≀R
Norman D. Thomson

### Chapter 3. Algebra and Sets

Abstract
This sections begins with some programs designed to support some of the earliest algebraic ideas introduced in schools. These programs illustrate the use of the format functions ($$\left( {\bar \phi } \right)$$) to mix calculations and conversion, and also a prompting function ASK which is given in Appendix 2.
Norman D. Thomson

### Chapter 4. Series

Abstract
Two programs are given, the fisrt constructs the first L terms of the sreies un = k0 + k1un-1, and the second prints all the terms using a recursive algorithms.
Norman D. Thomson

### Chapter 5. Formulae and Tables

Abstract
In using APL to do straightforward evaluations of arithmetic formulae, the input expression is usually so close to the algebraic statement of the formula that it scarcely merits formal description as a program. One of the considerable advantages of APL over other programming languages is that where only one algebraic quantity is involved in the formula this can often be generalized to a vector, or indeed a higher order array, to give multiple evaluations with no change in APL input. Here are some examples :
Area of a circle
oR⋆2
Volume of a sphere
o4× (R⋆3) ÷ 3
32+1.8×C
If conversion of a range of Centigrade degrees to Fahrenheit were required at 10 degree intervals, use
$${\text{32 }} + {\text{ 1}}.{\text{8x}}C \leftarrow 0,{\text{ 1}}0{\text{x}}\wr {\text{1}}0$$
When more than one variable is involved in the formula, outer products can be used to obtain simultaneous evaluations.
Norman D. Thomson

### Chapter 6. Geometry and Pattern

Abstract
Most of the programs in this chapter compute arrays of numerical values representing configurations of lines and points, which are supplied as right arguments to the graphics programs described in Appendix 1 to produce geometrical displays on the screen. The functions which are used in this chapter are summarised here with diagrams to provide a visual reminder of the parameters.
Norman D. Thomson

### Chapter 7. Calculus

Abstract
The following functions AREAS, TRAP, and SIMPSON use the function AXISLAB which is given in Chapter 2, and is now repeated:
AXISLAB
R[1]+((−/R[2 1])÷R[3])×0, ≀R[3]
R
left-hand end of scale, right-hand end of scale, number of intervals
Norman D. Thomson

### Chapter 8. Probability and Statistics

Without Abstract
Norman D. Thomson

### Chapter 9. Combinatorics

Abstract
Combinatorial algorithms deal with the arrangement of objects in cells. The number of such algorithms is legion due to such considerations as : are the objects ordered within cells; are the cells themselves ordered; are empty cells allowed; how many kinds of distinguishable objects are present. The whole range of such algorithms would fill a book in its own right — a few of the most basic ones are given here covering permutations (with derangements as a subset), combinations, selections with repetition, compositions and partitions.
Norman D. Thomson

### Chapter 10. Games and Miscellaneous

Abstract
The following program to deal whist/bridge hands exhibits yet another use of encodde, this time to assign a random drawing from the 52 cards of a pack to a suit/value are assigned by indexing in line 6 which also sorts each hand in suit order.
Norman D. Thomson

### Backmatter

Weitere Informationen