DELPHI DOUBLE不解之迷

procedure TForm1.cmd2Click(Sender: TObject);
var
str1, str2: string;
LValue1: Double;
LValue2: Extended;
LFactor1: Double;
LFactor2: Extended;
begin
LFactor1 := 0.1;
LFactor2 := 0.1;
LValue1 := 0.15;
LValue2 := 0.15;
LValue1 := (LValue1 / LFactor1) + 0.5;
LValue2 := (LValue2 / LFactor2) + 0.5;
LValue1 := Int(LValue1);                    //为什么Int(2)=1???
LValue2 := Int(LValue2);
LValue1 := LValue1 * LFactor1;
LValue2 := LValue2 * LFactor2;
str1 := FloatToStr(LValue1);
str2 := FloatToStr(LValue2);
ShowMessage(str1 + '|' + str2);
end;

原文地址:https://www.cnblogs.com/IDELPHI/p/6098857.html