mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-02 20:50:57 +01:00
* fixed str(extended(0.005):0:2) and related problems
git-svn-id: trunk@7959 -
This commit is contained in:
parent
4caa18e29a
commit
1eb1bf4c42
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user