Quick start manual

11-4
Delphi Language Guide
Internal data formats
Real types
The real types store the binary representation of a sign (+ or ), an exponent, and a
significand. A real value has the form
+/– significand * 2
exponent
where the significand has a single bit to the left of the binary decimal point. (That is, 0
<= significand < 2.)
In the figures that follow, the most significant bit is always on the left and the least
significant bit on the right. The numbers at the top indicate the width (in bits) of each
field, with the leftmost items stored at the highest addresses. For example, for a
Real48 value, e is stored in the first byte, f in the following five bytes, and s in the most
significant bit of the last byte.
The Real48 type
A 6-byte (48-bit) Real48 number is divided into three fields:
If 0 < e <= 255, the value v of the number is given by
v = (–1)
s
* 2
(e–129)
* (1.f)
If e = 0, then v = 0.
The Real48 type can’t store denormals, NaNs, and infinities. Denormals become zero
when stored in a Real48, while NaNs and infinities produce an overflow error if an
attempt is made to store them in a Real48.
The Single type
A 4-byte (32-bit) Single number is divided into three fields:
The value v of the number is given by
if 0 < e < 255, then v = (–1)
s
* 2
(e–127)
* (1.f)
if e = 0 and f <> 0, then v = (–1)
s
* 2
(–126)
* (0.f)
if e = 0 and f = 0, then v = (–1)
s
* 0
if e = 255 and f = 0, then v = (–1)
s
* Inf
if e = 255 and f <> 0, then v is a NaN
139 8
sf e
18 23
se f