🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #22812

Re: floating point formats -- usage of small floats

#22812
From: weaver
Date: Tue, 06 Mar 1990 23:19
28 lines
2023 bytes
In article <1990Mar5.031003.12107@Neon.Stanford.EDU> wilson@carcoar.Stanford.EDU (Paul Wilson) writes:
>I'm looking for info that would be useful in implementing short
>floating point numbers for Lisp/Smalltalk/etc.
>
>The basic idea is that I want short (1-word) floating point numbers to
>fit in one 32-bit words, *with* a runtime tag included.  My plan is
>to store the number shifted left a few bits, at a tag in the lower bits.

Someone has already mentioned the standard IEEE-854. This is a useful
document that describes how to implement a floating point system, 
with your own selection of the number of bits used for exponent and
fraction. (In contrast, IEEE-754 describes actual formats as well
as aspects such as rounding convered in IEEE-854).

I believe that if, rather than reducing the size of the exponent, you
reduce the size of the fraction, you can more easily use the existing
floating point support. Supposing you use the least significant bits 
for tag, to execute a floating point operation you would:

1. copy operands.
2. clear least signifigant bits that were used for tags.
3. add, etc., with pre-existing hardware/software.
4. check for exceptions and round to your precision (lots of work).
5. add new tag. 

It seems to me (without a great deal of study) that if your base 
system already does IEEE-754, that you could use this as I have 
set out to implement IEEE-854 with your choice of fraction size.
Technical Details
Message-ID: <22774@weitek.WEITEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!lll-winken!ubvax!weitek!weaver
References: <3880@uceng.UC.EDU> <1990Mar5.031003.12107@Neon.Stanford.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!lll-winken!ubvax!weitek!weaver
From: weaver@weitek.WEITEK.COM
Newsgroups: comp.arch
Subject: Re: floating point formats -- usage of small floats
Keywords: floating point formats, floating point usage, Lisp, heaps
Message-ID: <22774@weitek.WEITEK.COM>
Date: 6 Mar 90 23:19:20 GMT
References: <3880@uceng.UC.EDU> <1990Mar5.031003.12107@Neon.Stanford.EDU>
Sender: weaver@weitek.WEITEK.COM
Reply-To: weaver@weitek.UUCP (Michael Weaver)
Organization: WEITEK Corp. Sunnyvale Ca.
Lines: 28