3.1.2 Real types

Free Pascal uses the math coprocessor (or emulation) for all its oating-point calculations. The Real native type is processor dependant, but it is either Single or Double. Only the IEEE oating point types are supported, and these depend on the target processor and emulation options. The true Turbo Pascal compatible types are listed in table (3.4).


Table 3.4: Supported Real types

Type Range Signicant digits Size
Real platform dependant ??? 4 or 8
Single 1.5E-45 .. 3.4E38 7-8 4
Double 5.0E-324 .. 1.7E308 15-16 8
Extended 1.9E-4951 .. 1.1E4932 19-20 10
Comp -2E64+1 .. 2E63-1 19-20 8
Currency-922337203685477.5808922337203685477.5807 8

The Comp type is, in eect, a 64-bit integer and is not available on all target platforms. To get more information on the supported types for each platform, refer to the Programmers guide.

The currency type is a xed-point real data type which is internally used as an 64-bit integer type (automatically scaled with a factor 10000), this minimalizes rounding errors.