You are looking at historical revision 12978 of this page. It may differ significantly from its current revision.


A logarithmic number system (LNS) is an arithmetic system for representing real numbers. In LNS, a number X, is represented by the logarithm L of its absolute value:

   X -> { s, L = \log_b(|X|) }

where s denotes the sign of X (s = 1 if X > 0 and s = -1 if X < 0).



Library procedures

[procedure] {{lognum?:: X -> BOOL}}
[procedure] {{number->lognum:: X -> LOGNUM}}
[procedure] {{lognum->number:: LOGNUM -> X}}
[procedure] {{lognum+:: A * B -> X}}
[procedure] {{lognum-:: A * B -> X}}
[procedure] {{lognum*:: A * B -> X}}
[procedure] {{lognum/:: A * B -> X}}
[procedure] {{lognum-neg:: A -> B}}
[procedure] {{lognum-abs:: A -> B}}
[procedure] {{lognum-signum:: A -> B}}
[procedure] {{lognum-recip:: A -> B}}


Ivan Raikov


Initial version


Copyright 2009 Ivan Raikov and the Okinawa Institute of Science and Technology.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A full copy of the GPL license can be found at <>.