summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 63b381e..11bc05e 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.136.2.29 2005/08/25 15:46:30 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.136.2.30 2005/08/29 17:11:58 dgp Exp $
*/
#include "tclInt.h"
@@ -5632,12 +5632,10 @@ ExprRoundFunc(clientData, interp, objc, objv)
return TCL_ERROR;
}
if (fractPart < 0.0) {
- if (fractPart < -0.5
- || (fractPart == -0.5 && fmod(intPart, 2.0) != 0.0)) {
+ if (fractPart <= -0.5) {
mp_sub_d(&big, 1, &big);
}
- } else if (fractPart > 0.5
- || (fractPart == 0.5 && fmod(intPart, 2.0) != 0.0)) {
+ } else if (fractPart >= 0.5) {
mp_add_d(&big, 1, &big);
}
}