# revisions: 32765,32766

git-svn-id: branches/fixes_3_0@33756 -
This commit is contained in:
marco 2016-05-22 18:25:04 +00:00
parent 563003c4a6
commit ca447cc16e
2 changed files with 17 additions and 1 deletions

View File

@ -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;

View File

@ -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