[prev] [prev-tail] [tail] [up]

#### 3.1.2 Real types

Free Pascal uses the math coprocessor (or emulation) for all its floating-point calculations. The Real native type is processor dependent, but it is either Single or Double. Only the IEEE floating 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 | Significant 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-4932 .. 1.1E4932 | 19-20 | 10
Comp | -2E64+1 .. 2E63-1 | 19-20 | 8
Currency | -922337203685477.5808 .. 922337203685477.5807 | 19-20 | 8

The Comp type is, in effect, 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 Programmer’s Guide.

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

[prev] [prev-tail] [front] [up]