[Coco] Re: GCC: DFLOAT / DIRECT_PAGE

Theodore A. Evans alxevans at concentric.net
Sat Nov 15 16:02:00 EST 2003


On 11/15/03, jdaggett at gate.net wrote:

> Double precision Floating point in packed form is 64 bits. 
> 
> 1 sign bit 11 exponent bits, 52 bit fractional portion of the mantissa.
> It is assumed that the Integer part will always be one.
> 
> The 11 bits allow a number from 0 to 1.F * 2^2048 or by biasing the
> exponent, 1.F * 2^-1024 to 1.F * 2^ 1023.
> 
> In unpacked form the DP FP # will require a minimum of 10 bytes of memory.
> You will need to unpack the FP number to work with it. The sign bit
> becomes a sign byte and the exponent is in two bytes. Now the remaining
> seven bytes is a matter of preference. Six bytes and one niblle will be
> the fractional part of the mantissa and the lone nibble will represent the
> integer part. How the bytes are processed is a matter of preference. One
> needs to remember the not cross the order of the bits.
> 
> Extended format packed is 80 bits and quad precision is 128 bits. 

Great, except this internal representation for IEEE floating point,
not the ANSI C Standard.  Niether extended format packed, nor quad
precision are in teh ANSI standard, though so called double double is
commonly supported in C compilers.  It is a little like using void in
K&R, many compilers suppoported it, but it wasn't part of the
standard.

-- 
123456789012345678901234567890123456789012345678901234567
Theodore (Alex) Evans            | alxevans at concentric.net
94-1071 Kepakepa St. Unit #C-1   | http://www.concentric.net/~alxevans
Waipahu, HI 96797                | ICQ 78089262
x                                | (808) 676-0123         2B v ~2B = ?




More information about the Coco mailing list