Symmetric level-index arithmetic
Template:Short description Template:Use dmy dates The level-index (LI) representation of numbers, and its algorithms for arithmetic operations, were introduced by Charles Clenshaw and Frank Olver in 1984.[1]
The symmetric form of the LI system and its arithmetic operations were presented by Clenshaw and Peter Turner in 1987.[2]
Michael Anuta, Daniel Lozier, Nicolas Schabanel and Turner developed the algorithm for symmetric level-index (SLI) arithmetic, and a parallel implementation of it. There has been extensive work on developing the SLI arithmetic algorithms and extending them to complex and vector arithmetic operations.
Definition
The idea of the level-index system is to represent a non-negative real number Template:Mvar as
where , and the process of exponentiation is performed Template:Mvar times, with . Template:Mvar and Template:Mvar are the level and index of Template:Mvar respectively. Template:Math is the LI image of Template:Mvar. For example,
so its LI image is
The mapping function is called the generalized logarithm function. It is defined as
and it maps onto itself monotonically, thus being invertible on this interval. The inverse, the generalized exponential function, is defined by
The density of values Template:Mvar represented by Template:Mvar has no discontinuities as we go from level Template:Mvar to Template:Math (a very desirable property) since
The generalized logarithm function is closely related to the iterated logarithm used in computer science analysis of algorithms.
A sign bit may also be used to allow negative numbers. One takes sgn(X) and stores it as a boolean Template:Mvar (0 only occurs when Template:Math so could be stored either way, +1 chosen here). Mathematically, this is equivalent to taking the negative (additive inverse) of a number, and finding the SLI image for that. Using one bit for the sign enables the representation of negative numbers.
The symmetric form is used to allow negative exponents, if the magnitude of Template:Mvar is less than 1. One takes Template:Math or Template:Math and stores it as a boolean Template:Mvar (0 only occurs when Template:Math so could be stored either way, +1 chosen here). Mathematically, this is equivalent to taking the reciprocal (multiplicative inverse) of a small-magnitude number, and finding the SLI image for that. Using one bit for the reciprocal sign enables the representation of extremely small numbers.
Formally, we can define the SLI representation for an arbitrary real Template:Mvar (not 0 or 1) as
where Template:Mvar is the sign (additive inversion or not) of Template:Mvar, and Template:Mvar is the reciprocal sign (multiplicative inversion or not) as in the following equations:
whereas for Template:Mvar = 0 or 1, we have
For example,
and its SLI representation is
Adding
Most arithmetic operations in LI can be easily reduced to addition due to the nature of logarithms.[3] If we have some Template:Mvar, Template:Mvar, and Template:Mvar related by , taking the logarithm of both sides gives us , and once more gives us . The only non-trivial operation left to define is addition.
The problem of addition is posed as being able to find some Template:Mvar, given an arbitrary Template:Mvar and Template:Mvar with , such that . We also say that the levels of , , and are Template:Mvar, Template:Mvar, and Template:Mvar, and their indices are Template:Mvar, Template:Mvar, and Template:Mvar. It is helpful to define these 3 sequences, each indexed with some Template:Mvar:
With this defined, we can now state that Template:Mvar is equal to for the smallest Template:Mvar where . To find the actual values in these sequences, we use a set of recursive definitions each with an initial condition:
This can also be used to implement subtraction by changing the initial condition for Template:Mvar to be .
When using SLI, is not the only case; and should also be considered; typically called "large", "mixed", and "small" arithmetic. In mixed arithmetic, we replace the Template:Mvar sequence with and define as ; and in small arithmetic we replace the Template:Mvar sequence with , and becomes
See also
- Tetration
- Floating point (FP)
- Tapered floating point (TFP)
- Logarithmic number system (LNS)
- Level (logarithmic quantity)
References
Further reading
- Template:Cite journal
- Template:Cite journal
- Template:Cite web [1]
- Template:Cite journal [2]. Also reprinted in: Template:Cite book
External links
- sli-c-library (hosted by Google Code), "C++ Implementation of Symmetric Level-Index Arithmetic".