A real type has a set of values that is a subset of real numbers, which can be represented in floating-point notation with a fixed number of digits.
A value's floating-point notation normally is made up of three values--M, B, and E--such that M x B E = N where B is always 2, and both M and E are integral values within the real type's range.
Turbo Pascal provides five predefined real. Each type has a specific range and precision:
Type Range Digits Bytes
real 2.9e-39..1.7e38 11-12 6
single 1.5e-45..3.4e38 7-8 4
double 5.0e-324..1.7e308 15-16 8
extended 3.4e-4932..1.1e4932 19-20 0
comp -9.2e18..9.2e18 19-20 8
Note: The comp type is a 64-bit integer. It holds only integral values within the range
(-2 63 + 1) to (2 63 - 1).
Turbo Pascal supports two models of floating-point code generation:
You use theto switch between the two models.
In the $N+ state, the $E compiler directive controls whether to include an 8087 software emulation library in the final program.