你学过计算机组织原理吗? 如果学过, 一看就会明白:
一个浮点数有3部分组程: 符号位, 尾数, 指数;
delphi中并无float型, 它的浮点数是real想
包括real48, single,double, currency, comp ,格式如下
single:32bit;
bit:0 8 16 24 31
0 0000000 0 0000000 00000000 00000000
^~~~~~~~~~
| | 尾数v
| 指数e
符号位s
The value v of the number is given by
if 0 < e < 255, then
v = (?)^s * 2^(e?27) * (1.f )
if e = 0 and f <> 0, then
v = (?)^s * 2^(?26) * (0.f )
if e = 0 and f = 0, then
v = (?)^s * 0
if e = 255 and f = 0, then
v = (?)^s * Inf
if e = 255 and f <> 0, then
v is a NaN
参看: delphi help/ object pascal reference / memory management /real type
delphi 中real 默认为do
uble .