fixed entier routine: did not work properly for negative args

This commit is contained in:
ceriel 1989-11-28 14:16:38 +00:00
parent 55a133aa3c
commit a49ffb7945

View file

@ -48,7 +48,7 @@ PROCEDURE entier(x: REAL): INTEGER;
BEGIN
IF x < 0.0 THEN
i := TRUNC(-x);
IF FLOAT(-i) = x THEN
IF FLOAT(i) = -x THEN
RETURN -i;
ELSE
RETURN -i -1;