Lably
Skip to content

Logarithmic number system

Computer representation of real numbers

  • 2 min read
  • 3 chapters

Related on Lably

Through Real number, Logarithm and Absolute value

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(y−x),
logb⁡||X|−|Y||=x+db(y−x),

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

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication