mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 13:09:16 +02:00
troundm: fixed 32bit rmNearest tests and wrong result values
git-svn-id: trunk@36522 -
This commit is contained in:
parent
2109fb33ab
commit
8a6c995b75
@ -18,14 +18,14 @@ const
|
||||
);
|
||||
|
||||
res2_single: TExpected = (
|
||||
$4EFFFFFF,
|
||||
$4F000000,
|
||||
$4EFFFFFF,
|
||||
$4F000000,
|
||||
$4EFFFFFF
|
||||
);
|
||||
|
||||
res3_single: TExpected = (
|
||||
$CEFFFFFF,
|
||||
$CF000000,
|
||||
$CF000000,
|
||||
$CEFFFFFF,
|
||||
$CEFFFFFF
|
||||
@ -69,6 +69,7 @@ var
|
||||
yd: longword absolute y;
|
||||
begin
|
||||
writeln('integer value=',hexstr(x,8));
|
||||
setroundmode(rmNearest);
|
||||
y:=x;
|
||||
writeln('rmNearest ',y, ' ',hexstr(yd,8));
|
||||
if yd<>res[rmNearest] then fail;
|
||||
@ -100,17 +101,17 @@ begin
|
||||
y:=x;
|
||||
writeln('rmNearest ',y, ' ',hexstr(yq,16));
|
||||
if yq<>res[rmNearest] then fail;
|
||||
|
||||
|
||||
setroundmode(rmUp);
|
||||
y:=x;
|
||||
writeln('rmUp ',y, ' ',hexstr(yq,16));
|
||||
if yq<>res[rmUp] then fail;
|
||||
|
||||
|
||||
setroundmode(rmDown);
|
||||
y:=x;
|
||||
writeln('rmDown ',y, ' ',hexstr(yq,16));
|
||||
if yq<>res[rmDown] then fail;
|
||||
|
||||
|
||||
setroundmode(rmTruncate);
|
||||
y:=x;
|
||||
writeln('rmTruncate ',y, ' ',hexstr(yq,16));
|
||||
|
Loading…
Reference in New Issue
Block a user