Logarithmic number system
A logarithmic number system (LNS) is an arithmetic system used for representing real numbers in computer and digital hardware, especially for digital signal processing.
Overview
A number, [math]\displaystyle{ X }[/math], is represented in an LNS by two components: the logarithm ([math]\displaystyle{ x }[/math]) of its absolute value (as a binary word usually in two's complement), and its sign bit ([math]\displaystyle{ s }[/math]):
- [math]\displaystyle{ X\rightarrow\begin{cases} x=\log_b\big|X\big| \, , \\ s=\begin{cases} 0\text{ if } X\gt 0 \, , \\ 1\text{ if } X\lt 0 \, . \end{cases} \end{cases} }[/math]
An LNS can be considered as a floating-point number with the significand being always equal to 1 and a non-integer exponent. This formulation simplifies the operations of multiplication, division, powers and roots, since they are reduced down to addition, subtraction, multiplication, and division, respectively.
On the other hand, the operations of addition and subtraction are more complicated and they are calculated by the formulae:
- [math]\displaystyle{ \log_b(|X|+|Y|)=x+s_b(y-x) \, , }[/math]
- [math]\displaystyle{ \log_b\bigg||X|-|Y|\bigg|=x+d_b(y-x) \, , }[/math]
where the "sum" function is defined by [math]\displaystyle{ s_b(z)=\log_b(1+b^z) }[/math], and the "difference" function by [math]\displaystyle{ d_b(z)=\log_b\big|1-b^z\big| }[/math]. These functions [math]\displaystyle{ s_b(z) }[/math] and [math]\displaystyle{ d_b(z) }[/math] are also known as Gaussian logarithms.
The simplification of multiplication, division, roots, and powers is counterbalanced by the cost of evaluating these functions for addition and subtraction. This added cost of evaluation may not be critical when using an LNS primarily for increasing the precision of floating-point math operations.
History
Logarithmic number systems have been independently invented and published at least three times as an alternative to fixed-point and floating-point number systems.[1]
Nicholas Kingsbury and Peter Rayner introduced "logarithmic arithmetic" for digital signal processing (DSP) in 1971.[2]
A similar LNS named "signed logarithmic number system" (SLNS) was described in 1975 by Earl Swartzlander and Aristides Alexopoulos; rather than use two's complement notation for the logarithms, they offset them (scale the numbers being represented) to avoid negative logs.[3]
Samuel Lee and Albert Edgar described a similar system, which they called the "Focus" number system, in 1977.[4][1][5][6]
The mathematical foundations for addition and subtraction in an LNS trace back to Zecchini Leonelli and Carl Friedrich Gauss in the early 1800s.[7][8][9][10][11]
Applications
In the late 1800s, the Spanish engineer Leonardo Torres Quevedo conceived a series of analogue calculating mechanical machines[12][13] and developed one that could solve algebraic equations with eight terms, finding the roots, including the complex ones. One part of this machine called an "endless spindle" allowed the mechanical expression of the relation [math]\displaystyle{ y=\log(1+10^x) }[/math],[14] with the aim of extracting the logarithm of a sum as a sum of logarithms.
A LNS has been used in the Gravity Pipe (GRAPE-5) special-purpose supercomputer[15] that won the Gordon Bell Prize in 1999.
A substantial effort to explore the applicability of LNSs as a viable alternative to floating point for general-purpose processing of single-precision real numbers is described in the context of the European Logarithmic Microprocessor (ELM).[16][17] A fabricated prototype of the processor, which has a 32-bit cotransformation-based LNS arithmetic logic unit (ALU), demonstrated LNSs as a "more accurate alternative to floating-point", with improved speed. Further improvement of the LNS design based on the ELM architecture has shown its capability to offer significantly higher speed and accuracy than floating-point as well.[18]
LNSs are sometimes used in FPGA-based applications where most arithmetic operations are multiplication or division.[19]
See also
- Decibel
- Subnormal number
- Tapered floating point (TFP)
- Level-index arithmetic (LI) and symmetric level-index arithmetic (SLI)
- Gaussian logarithm
- Zech's logarithm
- ITU-T G.711
- A-law algorithm
- μ-law algorithm
References
- ↑ 1.0 1.1 "Addendum to "The Focus Number System"". IEEE Transactions on Computers (IEEE) C-28 (9): 693. September 1979. doi:10.1109/TC.1979.1675442. ISSN 0018-9340. (NB. Nicholas Kingsbury's name is incorrectly spelled in this citation.)
- ↑ "Digital filtering using logarithmic arithmetic". Electronics Letters (Institution of Engineering and Technology (IET)) 7 (2): 56–58. 1971-01-28. doi:10.1049/el:19710039. ISSN 0013-5194. http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=ELLEAK000007000002000056000001. Also reprinted in: Swartzlander, Jr., Earl E., ed (1990). Computer Arithmetic. I. Los Alamitos, CA, USA: IEEE Computer Society Press.
- ↑ "The Sign/Logarithm Number System". IEEE Transactions on Computers (IEEE) C-24 (12): 1238–1242. December 1975. doi:10.1109/T-C.1975.224172. ISSN 0018-9340. Also reprinted in: Swartzlander, Jr., Earl E., ed (1990). Computer Arithmetic. I. Los Alamitos, CA, USA: IEEE Computer Society Press.
- ↑ "The Focus Number System". IEEE Transactions on Computers (IEEE) C-26 (11): 1167–1170. November 1977. doi:10.1109/TC.1977.1674770. ISSN 0018-9340.
- ↑ Lee, Samuel C., ed (1977). "Chapter I.1.: Microcomputer Design – Focus Microcomputer Number System". Microcomputer Design and Applications. Academic Press, Inc.. pp. 1–40. doi:10.1016/B978-0-12-442350-3.50005-5. ISBN 0-12-442350-7. https://books.google.com/books?id=dL7iBQAAQBAJ&pg=PR10. [1]
- ↑ "FOCUS Microcomputer Number System". Communications of the ACM (ACM Press) 22 (3): 166–177. March 1979. doi:10.1145/359080.359085.
- ↑ (in fr) Supplément logarithmique. Théorie des logarithmes additionels et diductifs. Bordeaux: Brossier. 1803. (NB. 1802/1803 is the year XI. in the French Republican Calendar.)
- ↑ (in de) LEONELLIs logarithmische Supplemente, als ein Beitrag, Mängel der gewöhnlichen Logarithmentafeln zu ersetzen. Aus dem Französischen nebst einigen Zusätzen von GOTTFRIED WILHELM LEONHARDI, Souslieutenant beim kurfürstlichen sächsischen Feldartilleriecorps. Dresden: Walther'sche Hofbuchhandlung. 1806. (NB. An expanded translation of Zecchini Leonelli's Supplément logarithmique. Théorie des logarithmes additionels et diductifs.)
- ↑ "LEONELLI, Logarithmische Supplemente" (in de). Allgemeine Literaturzeitung (Halle-Leipzig) (45): 353–356. 1808-02-12.
- ↑ "Logarithm: Addition and Subtraction, or Gaussian Logarithms". Encyclopædia Britannica Eleventh Edition. http://www.theodora.com/encyclopedia/l2/logarithm.html#Addition_and_Subtraction.2C_or_Gaussian_Logarithms.
- ↑ Carl Friedrich Gauss – Titan of Science. Spectrum series (revised ed.). Mathematical Association of America (MAA). 2004. ISBN 978-0-88385-547-8. https://books.google.com/books?id=_dce9Jaq7iQC&pg=PA112.
- ↑ "The Instrumental Solution of Numerical Equations by D. Gibb, M.A.". written at Napier Tercentenary Exhibition. Modern instruments and methods of calculation: a handbook of the Napier Tercentenary Exhibition. Gerstein – University of Toronto. London, UK: G. Bell. 1914. p. 263. https://archive.org/stream/moderninstrument00horsuoft#page/127/mode/1up/search/1906.
- ↑ "I23". Encyclopédie des sciences mathematiques pures et appliquées. Paris, France: Gauthier-Villars. 1908. pp. 351.
- ↑ F. Thomas. A Short Account on Leonardo Torres' Endless Spindle, Mechanism and Machine Theory, Vol. 43, No. 8, pp. 1055-1063, 2008.
- ↑ Scientific Simulations with Special Purpose Computers: The GRAPE Systems. John Wiley & Sons. 1998. ISBN 978-0-471-96946-4. Bibcode: 1998sssc.book.....M. https://books.google.com/books?id=JHJQAAAAMAAJ&dq=intitle%3A%22GRAPE+Systems%22+logarithmic&q=logarithmic#search.
- ↑ "The European Logarithmic Microprocessor – a QR RLS application". Conference Record of Thirty-Fifth Asilomar Conference on Signals, Systems and Computers (Cat.No.01CH37256). 1. Monterey, CA, USA: IEEE. 2002-08-07. pp. 155–159. doi:10.1109/ACSSC.2001.986897. ISBN 0-7803-7147-X.
- ↑ "The European Logarithmic Microprocessor". IEEE Transactions on Computers (IEEE) 57 (4): 532–546. April 2008. doi:10.1109/TC.2007.70791. ISSN 0018-9340.
- ↑ "ROM-less LNS". 2011 IEEE 20th Symposium on Computer Arithmetic. IEEE. 2011-08-18. pp. 43–51. doi:10.1109/ARITH.2011.15. ISBN 978-1-4244-9457-6.
- ↑ "Comparing floating-point and logarithmic number representations for reconfigurable acceleration". 2006 IEEE International Conference on Field Programmable Technology. IEEE. 2007-01-02. pp. 337–340. doi:10.1109/FPT.2006.270342. ISBN 978-0-7803-9728-6.
Further reading
- "Semi-Logarithmic Number Systems". IEEE Transactions on Computers 47 (2): 145–151. February 1998. doi:10.1109/12.663760. ISSN 0018-9340. http://perso.ens-lyon.fr/jean-michel.muller/IEEETC-Fev98.pdf. Retrieved 2018-07-11. Previously published in: "Semi-Logarithmic Number Systems". Proceedings of the 12th IEEE Symposium on Computer Arithmetic (ARITH 12) (Bath, UK). July 1995.
- Applications of Digital Signal Processing to Audio and Acoustics. Kluwer Academic Publishing. 2002. ISBN 0-7923-8130-0. http://read.pudn.com/downloads82/ebook/317248/Kluwer_Academic-Applications_of_Digital_Signal_Processing_to_Audio_and_Acoustics-EBOOK-PLZ.pdf. Retrieved 2018-07-07. (NB. Describes a 13-bit LNS used in Yamaha music synthesizers during the 1980s.)
- "Gauss'sche Additionslogarithmen feiern 200. Geburtstag" (in de). de.sci.mathematik. 2002-08-29. https://groups.google.com/d/msg/de.sci.mathematik/Irdl51W3Ndk/gDG12qA4zn8J.
- "Rechnerarithmetik: Logarithmische Zahlensysteme" (in de). Friedrich-Schiller-Universität Jena. Summer 2008. https://users.fmi.uni-jena.de/~nez/rechnerarithmetik_5/folien/Rechnerarithmetik.2008.09.handout.pdf. [2]
- "The Higher Arithmetic". American Scientist 97 (5): 364–368. September–October 2009. doi:10.1511/2009.80.364. https://www.americanscientist.org/article/the-higher-arithmetic. Retrieved 2018-07-09. [3]. Also reprinted in: "Chapter 8: Higher Arithmetic". Foolproof, and Other Mathematical Meditations (1 ed.). The MIT Press. 2017. pp. 113–126. ISBN:0-26203686-X. ISBN 978-0-26203686-3. https://books.google.com/books?id=E4c3DwAAQBAJ.
- Embedded Systems Design with Special Arithmetic and Number Systems (1 ed.). Springer International Publishing AG. 2017-03-21. doi:10.1007/978-3-319-49742-6. ISBN 978-3-319-49741-9. https://link.springer.com/book/10.1007/978-3-319-49742-6. (389 pages)
External links
- A site that lists LNS papers
- esprit – European Logarithmic Microprocessor (formerly the 'High Speed Logarithmic Arithmetic' (HSLA) project)
- A VHDL library for LNS hardware generation
- A Short Account on Leonardo Torres’ Endless Spindle
Original source: https://en.wikipedia.org/wiki/Logarithmic number system.
Read more |