Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: Uses of "float:16" ? Message-ID: <2113@brl-tgr.ARPA> Date: Sun, 13-Oct-85 21:45:31 EDT Article-I.D.: brl-tgr.2113 Posted: Sun Oct 13 21:45:31 1985 Date-Received: Tue, 15-Oct-85 05:14:31 EDT References: <486@houxh.UUCP><2600015@ccvaxa><238@graffiti.UUCP><716@sfmag.UUCP><1841@brl-tgr.ARPA> <731@sfmag.UUCP> Organization: Ballistic Research Lab Lines: 34 Earlier, I mentioned having read about a floating-point data representation that obtained increased dynamic range traded off against precision by using a variable number of bits for the exponent. I have been informed that Bob Morris holds a patent on this, which is called "tapered floating point" and was described in some IEEE publication over 10 years ago. Rummaging around in my notes, I discovered the article I had in mind, entitled "FOCUS Microcomputer Number System" by Albert D. Edgar & Samuel C. Lee, in the March 1979 issue of CACM, pp. 166-177. It turns out that FOCUS represents floating-point quantities as their base-2 logarithms using a fixed number of bits for the fractional part of the logarithm. For example, 8-bit FOCUS data interpretation is as follows: sign,excess-8_fractional_exponent meaning 1,1001.000 -2^1 = -2 1,0000.000 -2^(-8) ~= -0.004 0,0111.000 +2^-1 = 0.5 0,1000.000 +2^0 = 1 0,1000.101 +2^(5/8) ~= 1.5 0,1111.111 +2^(63/8) ~= 235 This scheme has the advantage of not needing to use any bits to specify the size of any field; otherwise it has similar characteristics to the scheme that trades exponent against mantissa: large dynamic range combined with higher relative precision for numbers near 1. The article claims that FOCUS software implementations run faster on the average than fixed-point operations (presumably because multiply/divide is cheap for FOCUS). Note that there is a jump around true 0, so some adaptation of algorithms may be needed to work well with FOCUS. For further information, read the article. This obviously doesn't belong in net.lang.c, but that's where the discussion started.