next up previous contents index
Next: Character types Up: Data types Previous: Integer types

Real types

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

  

Type Range Significant digits Sizegif
Single 1.5E-45 .. 3.4E38 7-8 4
Real 5.0E-324 .. 1.7E308 15-16 8
Double 5.0E-324 .. 1.7E308 15-16 8
Extended 1.9E-4951 .. 1.1E4932 19-20 10
Compgif -2E64+1 .. 2E63-1 19-20 8
Table 1.2: Supported Real types

Until version 0.9.1 of the compiler, all the real types are mapped to type Double, meaning that they all have size 8. The SizeOf function is your friend here. The Real type of turbo pascal is automatically mappe to Double.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998