mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 21:11:23 +02:00
# revisions: 32765,32766
git-svn-id: branches/fixes_3_0@33756 -
This commit is contained in:
parent
563003c4a6
commit
ca447cc16e
@ -600,7 +600,7 @@ Var
|
||||
begin
|
||||
S:='';
|
||||
Result:=False;
|
||||
If ((Length(Value)-P)<=0) then
|
||||
If ((Length(Value)-P)<0) then
|
||||
exit;
|
||||
PS:=@Value[P];
|
||||
PC:=PS;
|
||||
|
@ -374,8 +374,10 @@ operator ** (bas,expo : int64) i: int64; inline;
|
||||
|
||||
{ rounds x towards positive infinity }
|
||||
function ceil(x : float) : Integer;
|
||||
function ceil64(x: float): Int64;
|
||||
{ rounds x towards negative infinity }
|
||||
function floor(x : float) : Integer;
|
||||
function floor64(x: float): Int64;
|
||||
|
||||
{ misc. functions }
|
||||
|
||||
@ -1055,6 +1057,13 @@ function ceil(x : float) : integer;
|
||||
Ceil:=Ceil+1;
|
||||
end;
|
||||
|
||||
function ceil64(x: float): Int64;
|
||||
begin
|
||||
Ceil64:=Trunc(x);
|
||||
if Frac(x)>0 then
|
||||
Ceil64:=Ceil64+1;
|
||||
end;
|
||||
|
||||
function floor(x : float) : integer;
|
||||
begin
|
||||
Floor:=Trunc(x);
|
||||
@ -1062,6 +1071,13 @@ function floor(x : float) : integer;
|
||||
Floor := Floor-1;
|
||||
end;
|
||||
|
||||
function floor64(x: float): Int64;
|
||||
begin
|
||||
Floor64:=Trunc(x);
|
||||
if Frac(x)<0 then
|
||||
Floor64:=Floor64-1;
|
||||
end;
|
||||
|
||||
|
||||
procedure Frexp(X: float; var Mantissa: float; var Exponent: integer);
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user