A logarithmic number system (LNS) is an arithmetic system used for representing
real number
In mathematics, a real number is a number that can be used to measurement, measure a ''continuous'' one-dimensional quantity such as a distance, time, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small var ...
s in computer and
digital hardware, especially for
digital signal processing
Digital signal processing (DSP) is the use of digital processing, such as by computers or more specialized digital signal processors, to perform a wide variety of signal processing operations. The digital signals processed in this manner ar ...
.
Overview
In an LNS, a number,
, is represented by the
logarithm
In mathematics, the logarithm is the inverse function to exponentiation. That means the logarithm of a number to the base is the exponent to which must be raised, to produce . For example, since , the ''logarithm base'' 10 of ...
,
, of its
absolute value as follows:
:
where
is a bit denoting the sign of
(
if
and
if
).
The number
is represented by a binary word which usually is in the
two's complement
Two's complement is a mathematical operation to reversibly convert a positive binary number into a negative binary number with equivalent (but negative) value, using the binary digit with the greatest place value (the leftmost bit in big- endian ...
format. An LNS can be considered as a
floating-point
In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be ...
number with the
significand
The significand (also mantissa or coefficient, sometimes also argument, or ambiguously fraction or characteristic) is part of a number in scientific notation or in floating-point representation, consisting of its significant digits. Depending on ...
being always equal to 1 and a non-integer
exponent
Exponentiation is a mathematical operation, written as , involving two numbers, the '' base'' and the ''exponent'' or ''power'' , and pronounced as " (raised) to the (power of) ". When is a positive integer, exponentiation corresponds to re ...
. 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 formula:
:
:
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.
History
Logarithmic number systems have been
independently invented and published at least three times as an alternative to
fixed-point and
floating-point
In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be ...
number systems.
Nicholas Kingsbury and Peter Rayner introduced "logarithmic arithmetic" for
digital signal processing
Digital signal processing (DSP) is the use of digital processing, such as by computers or more specialized digital signal processors, to perform a wide variety of signal processing operations. The digital signals processed in this manner ar ...
(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
Johann Carl Friedrich Gauss (; german: Gauß ; la, Carolus Fridericus Gauss; 30 April 177723 February 1855) was a German mathematician and physicist who made significant contributions to many fields in mathematics and science. Sometimes refe ...
in the early 1800s.
In the late 1800s, the Spanish engineer
Leonardo Torres y Quevedo
Leonardo Torres y Quevedo (; 28 December 1852 – 18 December 1936) was a Spanish civil engineer and mathematician of the late nineteenth and early twentieth centuries. Torres was a pioneer in the development of the radio control and automat ...
built 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
, with the aim of extracting the logarithm of a sum as a sum of logarithms.
Applications
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
In computing, an arithmetic logic unit (ALU) is a combinational digital circuit that performs arithmetic and bitwise operations on integer binary numbers. This is in contrast to a floating-point unit (FPU), which operates on floating point numb ...
(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
A field-programmable gate array (FPGA) is an integrated circuit designed to be configured by a customer or a designer after manufacturinghence the term ''Field-programmability, field-programmable''. The FPGA configuration is generally specifi ...
-based applications where most arithmetic operations are multiplication or division.
See also
*
Decibel
*
Subnormal number
In computer science, subnormal numbers are the subset of denormalized numbers (sometimes called denormals) that fill the underflow gap around zero in floating-point arithmetic. Any non-zero number with magnitude smaller than the smallest normal n ...
*
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
The μ-law algorithm (sometimes written mu-law, often approximated as u-law) is a companding algorithm, primarily used in 8-bit PCM digital telecommunication systems in North America and Japan. It is one of two versions of the G.711 stan ...
References
Further reading
* Previously published in:
* (NB. Describes a 13-bit LNS used in
Yamaha Yamaha may refer to:
* Yamaha Corporation, a Japanese company with a wide range of products and services, established in 1887. The company is the largest shareholder of Yamaha Motor Company (below).
** Yamaha Music Foundation, an organization estab ...
music synthesizers during the 1980s.)
*
*
*
Also reprinted in:
* {{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
Springer Nature or the Springer Nature Group is a German-British academic publishing company created by the May 2015 merger of Springer Science+Business Media and Holtzbrinck Publishing Group's Nature Publishing Group, Palgrave Macmillan, and Macm ...
, 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
A site that lists LNS papersesprit – European Logarithmic Microprocessor (formerly the 'High Speed Logarithmic Arithmetic' (HSLA) project)https://web.archive.org/web/20180707181644/http://www.ens-lyon.fr/LIP/Arenaire/Ware/FPLibrary/ --> A VHDL library for LNS hardware generationA Short Account on Leonardo Torres’ Endless Spindle
Computer arithmetic
Digital signal processing
Logarithms