Multidimensional Logarithmic Number System:Approximations to Unity
Approximations to Unity
A very fundamental difference between the classical LNS and MDLNS is the possibility of finding nontrivial approximations of one in the MDLNS. They can be used to constrain the dynamic range of exponents during general computations.
From Theorem 84.1, we know that unity can be approximated with arbitrary precision as a 2-integer. In fact, both bases can be changed and the theorem will still remain valid. Here we expand the discussion of these approximants within the MDLNS, and introduce new results.
As an example with 8-bit exponents, consider the generation of a sequence of successive values of possible one-digit MDLNS (2-integer) values. Table 84.2 shows a small subset of values (around unity) obtained from such a sequence. The fourth and fifth columns show the difference between successive binary and ternary exponents within the sequence. In this small subset of the complete sequence we observe that the differences are limited to only 3 sets of 2-integers with indices (233, -147), (149, -94), and (-84, 53). Each of the 2-integers represents a close approximation to unity, multiplication by which generates the next value in the sequence.
The usefulness of the existence of good approximations of unity, for general computations within dynamic constraints on the exponents, can be seen from the following example:
Example 84.1
Calculate x2 by using 9-bit fixed-point arithmetic, where x = (180, -115) in 2DLNS with odd base 3. The actual value of x is 0.207231. Clearly, x2 = (360, -230), which would cause overflow in 9-bit arithmetic. However, if we multiply in advance by a (properly selected) good approximation of unity, then the result obtained will have much smaller binary and ternary exponents; consequently, there will not be any risk of overflow. In our case, if we multiply x by (-84, 53) we obtain (96, -62) and now the squaring can be achieved in 9-bit arithmetic without overflow.
More to the point, if, at any stage of the computational process, one obtains a pair of large exponents, they can be reduced to within the required exponent dynamic range by multiplying the number obtained by a suitably good approximation of unity.
Comments
Post a Comment