var dtemp: Double;
etemp: Extended;
begin
dtemp:=1/3; // dtemp结果为:0.333333333333333
etemp:=1/3; // etemp结果为什么还是:0.333333333333333
if etemp>dtemp then
ShowMessage('Extended>Double');//说明 Extended 确实是精度高一些
end;
应该是你转换成字符串时产生的问题。
FloatToStr converts the floating-point value given by Value to its string representation. The conversion uses general number format with 15 significant digits.
FloatToStrF converts the floating-point value given by Value to its string representation.
The Value parameter is the value to convert.
The Precision parameter specifies the precision of the given value. It should be ☆7☆ or less for values of type Single, ★15★ or less for values of type Double, and ★18★ or less for values of type Extended.