DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Floating point operations

Data types and formats

Single-precision

Single-precision floating point numbers have the following format:

31 30 23 22 0
SIGN EXPONENT FRACTION
      ^  
      binary point  

Field Position Full Name
sign 31 sign bit (0==positive, 1==negative)
exponent 30-23 exponent (biased by 127)
fraction 22-0 fraction (bits to right of binary point)

Double-precision

Double-precision floating point numbers have the following format:

63 62 52 51 0
SIGN EXPONENT FRACTION
      ^  
      binary point  

Field Position Full Name
sign 63 sign bit (0==positive, 1==negative)
exponent 62-52 exponent (biased by 1023)
fraction 51-0 fraction (bits to right of binary point)


NOTE: For big-endian machines, the high-order word is at the low address; for little-endian machines, the high-order word is at the high address:

Extended-precision

Extended-precision floating point numbers have the following format on the Intel386(TM) microprocessor:

79 78 64 63 0
SIGN EXPONENT FRACTION
      ^  
      binary point  
For extended precision, bit 63 is always a 1, and the decimal point comes after this bit. The other formats have an implicit bit 1 before the fraction, as explained in ``Normalized numbers''.

Field Position Full Name
sign 79 sign bit (0==positive, 1==negative)
exponent 78-64 exponent (biased by 16,383)
fraction 63-0 fraction (bit 63=1, followed by the
    decimal point. Bits 62-0 are the fraction.


Next topic: Normalized numbers
Previous topic: IEEE arithmetic

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005