Logarithmic number system
{{Short description|Computer representation of real numbers}}
{{bots|deny=Citation bot}}
{{Use dmy dates|date=May 2019|cs1-dates=y}}
{{Use list-defined references|date=December 2022}}
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, , is represented in an LNS by two components: the logarithm () of its absolute value (as a binary word usually in two's complement), and its sign bit ():
:
x = \log_b\big|X\big|, \\
s = \begin{cases}
0\text{ if } X > 0, \\
1\text{ if } X < 0.
\end{cases}
\end{cases}
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 are calculated by the formulae
:
:
where the "sum" function is defined by , and the "difference" function by . These functions and 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.
{{anchor|SLNS|Focus}}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.
Nicholas Kingsbury and Peter Rayner introduced "logarithmic arithmetic" for digital signal processing (DSP) in 1971.
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.
Samuel Lee and Albert Edgar described a similar system, which they called the "Focus" number system, in 1977.
The mathematical foundations for addition and subtraction in an LNS trace back to Zecchini Leonelli and Carl Friedrich Gauss in the early 1800s.
{{anchor|GRAPE|ELM}}Applications
In the late 1800s, the Spanish engineer Leonardo Torres Quevedo conceived a series of analogue calculating mechanical machines 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 ,F. Thomas. [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.81.7754 A Short Account on Leonardo Torres' Endless Spindle], Mechanism and Machine Theory, Vol. 43, No. 8, pp. 1055-1063, 2008. 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 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). 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.
LNSs are sometimes used in FPGA-based applications where most arithmetic operations are multiplication or division.
See also
References
{{reflist|refs=
{{cite journal |author-first1=Nicholas G. |author-last1=Kingsbury |author-first2=Peter J. W. |author-last2=Rayner |title=Digital filtering using logarithmic arithmetic |journal=Electronics Letters |issn=0013-5194 |publisher=Institution of Engineering and Technology (IET) |volume=7 |issue=2 |date=1971-01-28 |doi=10.1049/el:19710039 |pages=56–58 |url=http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=ELLEAK000007000002000056000001|url-access=subscription }} Also reprinted in: {{cite book |editor-first=Earl E. |editor-last=Swartzlander, Jr. |title=Computer Arithmetic |volume=I |publisher=IEEE Computer Society Press |date=1990 |location=Los Alamitos, CA, USA}}
{{cite journal |author-first1=Earl E. |author-last1=Swartzlander, Jr. |author-first2=Aristides Georgiou |author-last2=Alexopoulos |author-link2=Aristides Georgiou Alexopoulos |title=The Sign/Logarithm Number System |journal=IEEE Transactions on Computers |issn=0018-9340 |publisher=IEEE |volume=C-24 |issue=12 |pages=1238–1242 |date=December 1975 |doi=10.1109/T-C.1975.224172}} Also reprinted in: {{cite book |editor-first=Earl E. |editor-last=Swartzlander, Jr. |title=Computer Arithmetic |volume=I |publisher=IEEE Computer Society Press |date=1990 |location=Los Alamitos, CA, USA}}
{{cite journal |author-first1=Samuel C. |author-last1=Lee |author-first2=Albert D. |author-last2=Edgar |title=The Focus Number System |journal=IEEE Transactions on Computers |issn=0018-9340 |publisher=IEEE |volume=C-26 |issue=11 |date=November 1977 |doi=10.1109/TC.1977.1674770 |pages=1167–1170}}
{{cite journal |author-first1=Samuel C. |author-last1=Lee |author-first2=Albert D. |author-last2=Edgar |title=Addendum to "The Focus Number System" |journal=IEEE Transactions on Computers |issn=0018-9340 |publisher=IEEE |volume=C-28 |issue=9 |date=September 1979 |doi=10.1109/TC.1979.1675442 |pages=693}} (NB. Nicholas Kingsbury's name is incorrectly spelled in this citation.)
{{cite book |author-first1=Samuel C. |author-last1=Lee |author-first2=Albert D. |author-last2=Edgar |editor-first=Samuel C. |editor-last=Lee |chapter=Chapter I.1.: Microcomputer Design – Focus Microcomputer Number System |title=Microcomputer Design and Applications |publisher=Academic Press, Inc. |date=1977 |doi=10.1016/B978-0-12-442350-3.50005-5 |pages=1–40 |isbn=0-12-442350-7 |chapter-url=https://books.google.com/books?id=dL7iBQAAQBAJ&pg=PR10}} [https://www.sciencedirect.com/science/article/pii/B9780124423503500055]
{{cite journal |author-first2=Samuel C. |author-last2=Lee |author-first1=Albert D. |author-last1=Edgar |title=FOCUS Microcomputer Number System |journal=Communications of the ACM |publisher=ACM Press |volume=22 |issue=3 |date=March 1979 |doi=10.1145/359080.359085 |pages=166–177 |doi-access=free }}
{{anchor|Leonelli-1802}}{{cite book |author-first=Zecchini |author-last=Leonelli |title=Supplément logarithmique. Théorie des logarithmes additionels et diductifs |language=fr |location=Bordeaux |publisher=Brossier |date=1803 |orig-date=1802}} (NB. 1802/1803 is the year XI. in the French Republican Calendar.)
{{cite book |title=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 |language=de |author-first=Gottfried Wilhelm |author-last=Leonhardi |publisher=Walther'sche Hofbuchhandlung |location=Dresden |date=1806}} (NB. An expanded translation of Zecchini Leonelli's Supplément logarithmique. Théorie des logarithmes additionels et diductifs.)
{{cite web |url=http://www.theodora.com/encyclopedia/l2/logarithm.html#Addition_and_Subtraction.2C_or_Gaussian_Logarithms |title=Logarithm: Addition and Subtraction, or Gaussian Logarithms |publisher=Encyclopædia Britannica Eleventh Edition}}
{{cite book |title=Carl Friedrich Gauss – Titan of Science |series=Spectrum series |author-first=Guy Waldo |author-last=Dunnington |author-link=Guy Waldo Dunnington |editor-first1=Jeremy |editor-last1=Gray |editor-first2=Fritz-Egbert |editor-last2=Dohse |publisher=Mathematical Association of America (MAA) |date=2004 |orig-date=1955 |edition=revised |isbn=978-0-88385-547-8 |url=https://books.google.com/books?id=_dce9Jaq7iQC&pg=PA112}}
{{cite book |author-first1=Junichiro |author-last1=Makino |author-first2=Makoto |author-last2=Taiji |title=Scientific Simulations with Special Purpose Computers: The GRAPE Systems |publisher=John Wiley & Sons |date=1998 |isbn=978-0-471-96946-4 |bibcode=1998sssc.book.....M |url=https://books.google.com/books?id=JHJQAAAAMAAJ&dq=intitle%3A%22GRAPE+Systems%22+logarithmic&q=logarithmic#search}}
{{cite book |author-first1=John Nicholas |author-last1=Coleman |author-first2=Christopher I. |author-last2=Softley |author-first3=Jiri |author-last3=Kadlec |author-first4=Rudolf |author-last4=Matousek |author-first5=Miroslav |author-last5=Licko |author-first6=Zdenek |author-last6=Pohl |author-first7=Antonin |author-last7=Hermanek |chapter= The European Logarithmic Microprocessor – a QR RLS application|title= Conference Record of Thirty-Fifth Asilomar Conference on Signals, Systems and Computers (Cat.No.01CH37256)|location=Monterey, CA, USA |volume=1 |pages=155–159 |date=2002-08-07 |orig-date=2001-11-04 |isbn=0-7803-7147-X |issn=1058-6393 |doi=10.1109/ACSSC.2001.986897 |publisher=IEEE}}
{{cite journal |author-first1=John Nicholas |author-last1=Coleman |author-first2=Christopher I. |author-last2=Softley |author-first3=Jiri |author-last3=Kadlec |author-first4=Rudolf |author-last4=Matousek |author-first5=Milan |author-last5=Tichy |author-first6=Zdenek |author-last6=Pohl |author-first7=Antonin |author-last7=Hermanek |author-first8=Nico F. |author-last8=Benschop |title=The European Logarithmic Microprocessor |journal=IEEE Transactions on Computers |issn=0018-9340 |publisher=IEEE |volume=57 |issue=4 |pages=532–546 |date=April 2008 |orig-date=2008-02-26 |doi=10.1109/TC.2007.70791}}
{{cite book |author-first1=R. Che |author-last1=Ismail |author-first2=John Nicholas |author-last2=Coleman |chapter= ROM-less LNS|title= 2011 IEEE 20th Symposium on Computer Arithmetic|issn=1063-6889 |publisher=IEEE |isbn=978-1-4244-9457-6 |pages=43–51 |date=2011-08-18 |orig-date=2011-07-25 |doi=10.1109/ARITH.2011.15 }}
{{cite book |doi=10.1109/FPT.2006.270342 |chapter= Comparing floating-point and logarithmic number representations for reconfigurable acceleration|author-first1=Haohuan |author-last1=Fu |author-first2=Oskar |author-last2=Mencer |author-first3=Wayne |author-last3=Luk |title= 2006 IEEE International Conference on Field Programmable Technology|publisher=IEEE |date=2007-01-02 |orig-date=2006-12-13 |isbn=978-0-7803-9728-6 |pages=337–340}}
}}
Further reading
- {{cite journal |title=Semi-Logarithmic Number Systems |author-first1=Jean-Michel |author-last1=Muller |author-first2=Alexandre |author-last2=Scherbyna |author-first3=Arnaud |author-last3=Tisserand |journal=IEEE Transactions on Computers |volume=47 |number=2 |date=February 1998 |pages=145–151 |issn=0018-9340 |doi=10.1109/12.663760 |url=http://perso.ens-lyon.fr/jean-michel.muller/IEEETC-Fev98.pdf |access-date=2018-07-11 |url-status=live |archive-url=https://web.archive.org/web/20180713004327/http://perso.ens-lyon.fr/jean-michel.muller/IEEETC-Fev98.pdf |archive-date=2018-07-13}} Previously published in: {{cite journal |title=Semi-Logarithmic Number Systems |author-first1=Jean-Michel |author-last1=Muller |author-first2=Alexandre |author-last2=Scherbyna |author-first3=Arnaud |author-last3=Tisserand |journal=Proceedings of the 12th IEEE Symposium on Computer Arithmetic (ARITH 12) |location=Bath, UK |date=July 1995}}
- {{cite book |editor-first1=Mark |editor-last1=Kahrs |editor-first2=Karlheinz |editor-last2=Brandenburg |title=Applications of Digital Signal Processing to Audio and Acoustics |publisher=Kluwer Academic Publishing |date=2002 |orig-date=1998 |isbn=0-7923-8130-0 |url=http://read.pudn.com/downloads82/ebook/317248/Kluwer_Academic-Applications_of_Digital_Signal_Processing_to_Audio_and_Acoustics-EBOOK-PLZ.pdf |access-date=2018-07-07 |url-status=live |archive-url=https://web.archive.org/web/20180707221820/http://read.pudn.com/downloads82/ebook/317248/Kluwer_Academic-Applications_of_Digital_Signal_Processing_to_Audio_and_Acoustics-EBOOK-PLZ.pdf |archive-date=2018-07-07}} (NB. Describes a 13-bit LNS used in Yamaha music synthesizers during the 1980s.)
- {{cite web |title=Gauss'sche Additionslogarithmen feiern 200. Geburtstag |language=de |author-first=Hermann |author-last=Kremer |work=de.sci.mathematik |date=2002-08-29 |url=https://groups.google.com/d/msg/de.sci.mathematik/Irdl51W3Ndk/gDG12qA4zn8J |access-date=2018-07-07 |url-status=live |archive-url=https://archive.today/20180707222823/https://groups.google.com/forum/%23!msg/de.sci.mathematik/Irdl51W3Ndk/gDG12qA4zn8J |archive-date=2018-07-07}}
- {{cite web |title=Rechnerarithmetik: Logarithmische Zahlensysteme |type=Lecture script |date=Summer 2008 |author-first=Eberhard |author-last=Zehendner |language=de |publisher=Friedrich-Schiller-Universität Jena |url=https://users.fmi.uni-jena.de/~nez/rechnerarithmetik_5/folien/Rechnerarithmetik.2008.09.handout.pdf |access-date=2018-07-09 |url-status=live |archive-url=https://web.archive.org/web/20180709202904/https://users.fmi.uni-jena.de/~nez/rechnerarithmetik_5/folien/Rechnerarithmetik.2008.09.handout.pdf |archive-date=2018-07-09}} [https://web.archive.org/web/20180806175620/https://users.fmi.uni-jena.de/~nez/rechnerarithmetik_5/folien/Rechnerarithmetik.2008.komplett.pdf]
- {{cite journal |title=The Higher Arithmetic |author-first=Brian |author-last=Hayes |journal=American Scientist |date=September–October 2009 |volume=97 |number=5 |pages=364–368 |doi=10.1511/2009.80.364 |url=https://www.americanscientist.org/article/the-higher-arithmetic |access-date=2018-07-09 |url-status=live |archive-url=https://web.archive.org/web/20180709194903/https://www.americanscientist.org/article/the-higher-arithmetic |archive-date=2018-07-09|url-access=subscription }} [https://www.americanscientist.org/sites/americanscientist.org/files/20097301410207456-2009-09Hayes.pdf]. Also reprinted in: {{cite book |title=Foolproof, and Other Mathematical Meditations |chapter=Chapter 8: Higher Arithmetic |publisher=The MIT Press |author-first=Brian |author-last=Hayes |date=2017 |edition=1 |isbn=978-0-26203686-3 |id={{ISBN|0-26203686-X}} |pages=113–126 |url=https://books.google.com/books?id=E4c3DwAAQBAJ}}
- {{cite book |editor-last1=Amir Sabbagh |editor-first1=Molahosseini |editor-first2=Leonel Seabra |editor-last2=de Sousa |editor3=Chip-Hong Chang |title=Embedded Systems Design with Special Arithmetic and Number Systems |publisher=Springer International Publishing AG |date=2017-03-21 |edition=1 |isbn=978-3-319-49741-9 |doi=10.1007/978-3-319-49742-6 |lccn=2017934074 |url=https://link.springer.com/book/10.1007/978-3-319-49742-6}} (389 pages)
External links
- [http://www.xlnsresearch.com A site that lists LNS papers]
- [https://research.ncl.ac.uk/elm/ esprit – European Logarithmic Microprocessor (formerly the 'High Speed Logarithmic Arithmetic' (HSLA) project)]
- [http://www.ens-lyon.fr/LIP/Arenaire/Ware/FPLibrary/ A VHDL library for LNS hardware generation]
- [https://web.archive.org/web/20121203012202/http://digital.csic.es/bitstream/10261/30460/1/doc1.pdf A Short Account on Leonardo Torres’ Endless Spindle]