mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 09:29:26 +02:00
+ added
This commit is contained in:
parent
1162235207
commit
a8f2c6e5f7
31
tests/webtbs/tw3708.pp
Normal file
31
tests/webtbs/tw3708.pp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
program prec;
|
||||||
|
|
||||||
|
uses SysUtils;
|
||||||
|
|
||||||
|
var
|
||||||
|
i:Integer;
|
||||||
|
v: Double;
|
||||||
|
s: string;
|
||||||
|
|
||||||
|
begin
|
||||||
|
v := 1.0000000000001;
|
||||||
|
for i := 1 to 20 do
|
||||||
|
begin
|
||||||
|
s := FloatToStrF(v, ffGeneral, i, 0);
|
||||||
|
WriteLn(i, ' ', s);
|
||||||
|
if (i < 13) then
|
||||||
|
begin
|
||||||
|
if (s <> '1') then
|
||||||
|
begin
|
||||||
|
writeln('error');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if (s <> '1.0000000000001') then
|
||||||
|
begin
|
||||||
|
writeln('error');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user