This chapter outlines the facilities for manipulating numbers of various sorts in Pop-11. More details can be found in HELP MATH, REF NUMBERS REF ITEMISE details the conventions for typing in representations of numbers in Pop-11 programs, which are also summarised below.

Pop-11 provides a standard collection of mathematical facilities, including powerful tools for doing very high precision calculations using "bigintegers" or "ratios". These are not provided in many programming languages, partly because they lead to complex store management problems. These problems are solved by the use of an automatic garbage collector in Pop-11. The same is true of modern lisp systems and some other languages, e.g. ML and some implementations of Prolog. (All the Poplog languages share these facilities.)

- Mathematical knowledge presupposed
- The machine representation of numbers in Poplog
- Types of numbers in Pop-11
- Forming numerical expressions
- Additional facilities for printing numbers
- Maximum and minimum integer sizes: pop_max_int, pop_min_int
- The representation of floating point numbers: lib float_parameters
- Basic arithmetical facilities
- Arithmetical operators
- Infix predicates on numbers
- Recognizer predicates for number types
- Coercing numbers from one type to another
- Other arithmetic procedures
- Illustrating popradians
- Other global variables controlling arithmetical computations
- Miscellaneous operations on integers, ratios, floats
- Complex Specific Operations
- random and oneof
- Additional mathematical functions
- Exercises
- Testing for equality and inequality
- Bitwise (Logical) integer operators
- Iteration over numbers
- Using external mathematical libraries

Fri Jan 2 03:17:44 GMT 1998