Semi-Logarithmic Number Systems Jean-Michel Muller and Arnaud Tisserand Alexandre Scherbyna CNRS, Laboratoire LIP l?cole Normale Supkrieure de Lyon 46 All&e d’Italie, 69364 LYON Cedex 07 FRANCE State Technical University Cathedral SAPU 31 Povitroflotski prospekt, KIEV, 252037 UKRAINE Abstract We present a new class of number systems, called Semi-Logarithmic Number Systems, that constitute a family of various compromises between floating-point and logarithmic number systems. We propose arith- metic algorithms for the Semi-Logarithmic Number Systems, and we compare these number systems to the classical floating-point or logarithmic number sys- tems. performed using tables for the functions log,(l + 2”) and log,( 1 - 2”), since: { logz(A + B) = log,(A) + logz(1 + 210z~(B)-‘oz~(A)) logz(A - B) = log,(A) + log,(l - 210z@)-10z,(A)) 1 Introduction The floating-point number system [5] is widely used for representing real numbers in computers, but many other number systems have been proposed. Among them, one can cite: the logarithmic and sign-logarithm number systems [8, 14, 13, 16, 7, 3, 91 the level-index number system [12, 17, 181, some rational number sys- tems [lo], and some modifications of the floating-point number system [19, 111. Those systems were designed to achieve various goals: e.g. to avoid overflows and underflows, to improve the accuracy, or to accelerate some computations. For instance, the sign-logarithm number system, introduced by Swartzlander and Al- expoulos [14], was designed in order to accelerate the multiplications. As pointed out by the authors, “it cannot replace conventional arithmetic units in gen- eral purpose computers; rather it is intended to en- hance the implementation of special-purpose proces- sors for specialized applications”. That number sys- tem is interesting for problems where the required pre- cision is relatively low, and where the ratio The major drawback of the Logarithmic Number Sys- tem arises when a high level of accuracy is required. If the computations are performed with n-digit num- bers, then a straightforward implementation requires a table containing 2” elements. Interpolation tech- niques allow the use of smaller tables (see [15, 2, 7]), so that 32-bit logarithmic number systems become fea- sible. Our purpose in this paper is to present a new number system that allows the use of even smaller tables. That number system will be a sort of compro- mise between the logarithmic and the floating-point number systems. More exactly, we show a family of number systems, parameterized by a number k, and the systems obtained for the two extremal values of k are the floating-point and the logarithmic number systems. With some of those number systems, multi- plication and division will be almost as easy to perform as in the logarithmic number system, whereas addition and subtraction will require much smaller tables. 2 The Semi-logarithmic Number Sys- tems Let k be an integer, let z be a real number different from 0, and define ek,= as the multiple of 2-” satisfying 2ek+ 5 1x1 < 2+*+2-L. We immediately find number of multiplications number of additions ek,x = p log2 12 IJ 2k is relatively high. Roughly speaking, in such sys- tems, the numbers are represented by their radix-2 logarithms written in fixed-point. The multiplications and divisions are performed by adding or subtracting the logarithms, and the additions and subtractions are Define mk,, as: from o < zk log, I4 - 12” log2 I4 < L - 2k 2” 1063-6689/95$4.000 1995 IEEE 201 Proceedings of the 12th Symposium on Computer Arithmetic (ARITH '95) 1063-6889/95 $10.00 © 1995 IEEE