mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 15:49:16 +02:00
* fix test
This commit is contained in:
parent
5d571853ac
commit
e2624fdaaa
@ -10,10 +10,10 @@ function get_sign(d: double): Integer;
|
|||||||
inc(p,4);
|
inc(p,4);
|
||||||
{$else}
|
{$else}
|
||||||
{$ifdef FPC_LITTLE_ENDIAN}
|
{$ifdef FPC_LITTLE_ENDIAN}
|
||||||
inc(p,4);
|
inc(p,sizeof(d)-1);
|
||||||
{$endif}
|
{$endif}
|
||||||
{$endif}
|
{$endif}
|
||||||
if (p^ and $80)=0 then
|
if (p^ and $80)<>0 then
|
||||||
get_sign:=-1;
|
get_sign:=-1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -23,6 +23,10 @@ var
|
|||||||
zero : Double;
|
zero : Double;
|
||||||
begin
|
begin
|
||||||
zero:=0.0;
|
zero:=0.0;
|
||||||
|
|
||||||
|
if get_sign(1.0)<>1 then
|
||||||
|
halt(1);
|
||||||
|
|
||||||
writeln(-zero);
|
writeln(-zero);
|
||||||
if get_sign(-zero)<>-1 then
|
if get_sign(-zero)<>-1 then
|
||||||
halt(1);
|
halt(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user