* fixed str(extended(0.005):0:2) and related problems

git-svn-id: trunk@7959 -
This commit is contained in:
Jonas Maebe 2007-07-05 15:25:01 +00:00
parent 4caa18e29a
commit 1eb1bf4c42
2 changed files with 8 additions and 2 deletions

View File

@ -378,9 +378,9 @@ begin
for fracCount := 1 to currPrec do
factor := factor * 10.0;
corrval := corrval / factor;
if d >= corrVal then
if d >= corrVal-roundCorr then
d := d + corrVal;
if int(d) = 1 then
if int(d+roundCorr) = 1 then
begin
roundStr(temp,spos);
d := frac(d);

View File

@ -45,6 +45,12 @@ begin
writeln(result);
if (result <> '8.502') then
halt(1);
e:=0.005;
str(e:0:2,result);
writeln(result);
if (result<>'0.01') then
halt(1);
end;
begin