|
@@ -430,7 +430,7 @@ function ceil(x : float) : longint;
|
|
|
|
|
|
begin
|
|
begin
|
|
Ceil:=Trunc(x);
|
|
Ceil:=Trunc(x);
|
|
- If (x > 0) And (Frac(x) > 0) then
|
|
|
|
|
|
+ If Frac(x)>0 then
|
|
Ceil:=Ceil+1;
|
|
Ceil:=Ceil+1;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -438,8 +438,8 @@ function floor(x : float) : longint;
|
|
|
|
|
|
begin
|
|
begin
|
|
Floor:=Trunc(x);
|
|
Floor:=Trunc(x);
|
|
- If (x < 0) And (Frac(x) > 0) then
|
|
|
|
- Floor := Floor - 1;
|
|
|
|
|
|
+ If Frac(x)<0 then
|
|
|
|
+ Floor := Floor-1;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure frexp(x : float;var mantissa,exponent : float);
|
|
procedure frexp(x : float;var mantissa,exponent : float);
|
|
@@ -666,7 +666,10 @@ end;
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.11 1999-06-04 08:44:34 jonas
|
|
|
|
|
|
+ Revision 1.12 1999-09-21 20:47:05 florian
|
|
|
|
+ * ceil and floor still had bugs :), hopefully it's the final fix now
|
|
|
|
+
|
|
|
|
+ Revision 1.11 1999/06/04 08:44:34 jonas
|
|
* Ceil and Floor are now really fixed :)
|
|
* Ceil and Floor are now really fixed :)
|
|
|
|
|
|
Revision 1.10 1999/06/03 16:22:57 jonas
|
|
Revision 1.10 1999/06/03 16:22:57 jonas
|