Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

    The 80x87 FPU supports seven data types: 3 floating point types,
    1 packed decimal type, and 3 integer types.

    Type        Description
    Single      32-bit single-precision FP format
                sign     bit  31
                exponent bits 30..23   8-bit excess-127 format  (bias=07Fh)
                signi-
                 ficand  bits 22..0    24-bit one's complement format
                                       (24th bit implied)
                digits   7 to 8
                range    approx. 1.18*(10**-38) to 3.40*(10**+38)
                (this data type is sometimes called 'short real')

    Double      64-bit double-precision FP format
                sign     bit  63
                exponent bits 62..52   11-bit excess-1023  (bias=3FFh)
                signi-
                 ficand  bits 51..0    53-bit one's complement format
                                       (53rd bit implied)
                digits   15 to 16
                range    approx. 2.23*(10**-308) to 1.79*(10**+308)
                (this data type is sometimes called 'long real')

    Extended    80-bit extended-precision FP format
                sign     bit  79
                exponent bits 78..64   15-bit excess-16383  (bias=3FFFh)
                signi-
                 ficand  bits 63..0    64-bit one's complement format
                                       (no implied bit)
                digits   19 to 20
                range    approx. 3.37*(10**-4932) to 1.18*(10**+4932)
                (this data type is sometimes called 'temporary real')


    Packed      80-bit signed packed decimal integer
    decimal     sign           bit  79
                ignored by FPU bits 78..72
                18 BCD digits  bits 71..0
                range          -999,999,999,999,999,999 to
                               +999,999,999,999,999,999

    Word        16-bit two's complement integer
    integer     range -32,768 to 32,767

    Short       32-bit two's complement integer
    integer     range -2,147,483,648 to +2,147,483,647

    Long        64-bit two's complement integer
    integer     range approx. -9.22*(10**18) to +9.22*(10**18)


        Note
        With the exception of the 80-bit extended-precision format, all
        these data types exist in memory only. When they are loaded into
        FPU data registers they are automatically converted to extended-
        precision format and operated on in that format. When stored
        from an FPU data register into memory they are automatically
        converted to the format of the destination.


        Note
        For the single-real and double-real formats, only the fraction
        part of the significand is encoded. The integer is assumed to be
        one for all numbers except zero and denormalized finite numbers.
        For the extended-real format, the integer is contained in bit
        63, and the most-significant fraction bit is bit 62. Here, the
        integer is explicitly set to one for normalized numbers,
        infinities, and NaNs, and to zero for zero and denormalized
        numbers.


        Data type correspondence
        FPU                     TASM    C++          Turbo Pascal   Bytes
        single-precision FP     dword   float        single           4
        double-precision FP     qword   double       double           8
        extended-precision FP   tbyte   long double  extended        10
        packed decimal          tbyte   N/A          N/A             10
        word integer            word    int          integer          2
        short integer           dword   long int     longint          4
        long integer            qword   ?            comp             8


See Also: FPU registers

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson