Table of Contents        Previous topic       Next topic       

C COMPILER->Compiler Data Formats->long double

For this version of the Crossware 8051 ANSI C compiler these are 64 bits wide.  The format is identical to the format for double.  (An enhanced version of the compiler is also available which supports 80 bit long doubles).

If a global variable fVar is declared as long double, then the least significant byte is located at address _fVar and the most significant byte is located at address _fVar+7.

The format for long doubles is in accordance with IEEE754 double format:

Sign:bit position 63 (1 bit)
Exponent:bit positions 62 to 52 (11 bits)
Mantissa:bit positions 51 to 0 (53 bits  the most significant bit is inferred)