From a49ffb794552203268ed132142c35f7c7b98a5c5 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 28 Nov 1989 14:16:38 +0000 Subject: [PATCH] fixed entier routine: did not work properly for negative args --- lang/m2/libm2/MathLib0.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/m2/libm2/MathLib0.mod b/lang/m2/libm2/MathLib0.mod index 15c3161cb..f3f67be6b 100644 --- a/lang/m2/libm2/MathLib0.mod +++ b/lang/m2/libm2/MathLib0.mod @@ -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;