diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclExecute.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2003-01-08 Don Porter <dgp@users.sourceforge.net> + + * generic/tclExecute.c (TclExprFloatError): Use the IS_NAN macro + for greater clarity of code. + 2003-01-07 Don Porter <dgp@users.sourceforge.net> * generic/tclCompCmds.c (TclCompileReturnCmd): diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 1319dc6..ef7797b 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.90 2002/11/12 02:25:48 hobbs Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.91 2003/01/08 21:29:06 dgp Exp $ */ #include "tclInt.h" @@ -5717,7 +5717,7 @@ TclExprFloatError(interp, value) char *s; Tcl_ResetResult(interp); - if ((errno == EDOM) || (value != value)) { + if ((errno == EDOM) || IS_NAN(value)) { s = "domain error: argument not in valid range"; Tcl_AppendToObj(Tcl_GetObjResult(interp), s, -1); Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", s, (char *) NULL); |