Logarithmic number system

From testwiki
Revision as of 01:28, 14 February 2025 by imported>Vincent Lefèvre (See also: typography / real article name)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Short description Template:Bots Template:Use dmy dates Template:Use list-defined references 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, X, is represented in an LNS by two components: the logarithm (x) of its absolute value (as a binary word usually in two's complement), and its sign bit (s):

X{x=logb|X|,s={0 if X>0,1 if X<0.

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

logb(|X|+|Y|)=x+sb(yx),
logb||X||Y||=x+db(yx),

where the "sum" function is defined by sb(z)=logb(1+bz), and the "difference" function by db(z)=logb|1bz|. These functions sb(z) and db(z) 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.

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]

Template:AnchorApplications

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 y=log(1+10x),[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

References

Template:Reflist

Further reading

  1. 1.0 1.1 Cite error: Invalid <ref> tag; no text was provided for refs named Lee_1979_1
  2. Cite error: Invalid <ref> tag; no text was provided for refs named Kingsbury_1971
  3. Cite error: Invalid <ref> tag; no text was provided for refs named Swartzlander_1975
  4. Cite error: Invalid <ref> tag; no text was provided for refs named Lee_1977_1
  5. Cite error: Invalid <ref> tag; no text was provided for refs named Lee_1977_2
  6. Cite error: Invalid <ref> tag; no text was provided for refs named Lee_1979_2
  7. Cite error: Invalid <ref> tag; no text was provided for refs named Leonelli_1802
  8. Cite error: Invalid <ref> tag; no text was provided for refs named Leonhardi_1806
  9. Cite error: Invalid <ref> tag; no text was provided for refs named Gauss_1808
  10. Cite error: Invalid <ref> tag; no text was provided for refs named Theodora
  11. Cite error: Invalid <ref> tag; no text was provided for refs named Dunnington_2004
  12. Cite error: Invalid <ref> tag; no text was provided for refs named Horsburg-Napier_1914
  13. Cite error: Invalid <ref> tag; no text was provided for refs named Mehmke_1908
  14. F. Thomas. A Short Account on Leonardo Torres' Endless Spindle, Mechanism and Machine Theory, Vol. 43, No. 8, pp. 1055-1063, 2008.
  15. Cite error: Invalid <ref> tag; no text was provided for refs named Makino_1998
  16. Cite error: Invalid <ref> tag; no text was provided for refs named Coleman_2001
  17. Cite error: Invalid <ref> tag; no text was provided for refs named Coleman_2008
  18. Cite error: Invalid <ref> tag; no text was provided for refs named Ismail_2011
  19. Cite error: Invalid <ref> tag; no text was provided for refs named Fu_2006