From 9de57791124f842576fb1dfc3a80926dc14cb981 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 8 Jan 2003 21:29:04 +0000 Subject: * generic/tclExecute.c (TclExprFloatError): Use the IS_NAN macro for greater clarity of code. --- ChangeLog | 5 +++++ generic/tclExecute.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e645349..bd3f113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-01-08 Don Porter + + * generic/tclExecute.c (TclExprFloatError): Use the IS_NAN macro + for greater clarity of code. + 2003-01-07 Don Porter * 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); -- cgit v0.12