Floating point type sizes and mapping vary from one processor to another. Except for the Intel 80x86 architecture, the extended type maps to the IEEE double type if a hardware oating point coprocessor is present.
Floating point types have a storage binary format divided into three distinct elds : the mantissa, the exponent and the sign bit which stores the sign of the oating point value.
The single type occupies 4 bytes of storage space, and its memory structure is the same as the IEEE-754 single type. This type is the only type which is guaranteed to be available on all platforms (either emulated via software or directly via hardware).
The memory format of the single format looks like what is shown in gure (8.1).
The double type occupies 8 bytes of storage space, and its memory structure is the same as the IEEE-754 double type.
The memory format of the double format looks like like what is shown in gure (8.2).
On processors which do not support co-processor operations (and which have the f$E+g switch), the double type does not exist.
For Intel 80x86 processors, the extended type has takes up 10 bytes of memory space. For more information on the extended type consult the Intel Programmer's reference.
For all other processors which support oating point operations, the extended type is a nickname for the type which supports the most precision, this is usually the double type. On processors which do not support co-processor operations (and which have the f$E+g switch), the extended type usually maps to the single type.
For Intel 80x86 processors, the comp type contains a 63-bit integral value, and a sign bit (in the MSB position). The comp type takes up 8 bytes of storage space.
On other processors, the comp type is not supported.
Contrary to Turbo Pascal, where the real type had a special internal format, under Free Pascal the real type simply maps to one of the other real types. It maps to the double type on processors which support oating point operations, while it maps to the single type on processors which do not support oating point operations in hardware. See table (8.2) for more information on this.
|