Premium
Arbitrary precision arithmetic in Algol 68
Author(s) -
Schonfelder J. L.,
Thomason J. T.
Publication year - 1979
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380090302
Subject(s) - arithmetic , arbitrary precision arithmetic , multiplication (music) , computer science , division (mathematics) , variable (mathematics) , double precision floating point format , algorithm , mathematics , floating point , mathematical analysis , combinatorics
Algol 68 enables facilities for such things as arbitrary precision arithmetic to be provided in a particularly elegant and convenient way. The library segment mlaritha which provides such facilities is described. This segment enables numerical quantities to be stored and manipulated with almost the same degree of ease, or difficulty, as REAL quantities but with arbitrary and dynamically variable precision. The method of ‘ NUMBER ’ storage used in mlaritha is discussed in detail and the fundamental algorithms used for the arithmetic operations of addition, multiplication and division, etc., are described. Special attention is given to the ‘costs’ inherent in the use of the system; particularly in the time ‘costs’ of each of the operations and the dependence on precision.