diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-17 17:30:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-17 17:30:13 (GMT) |
commit | e246b44499e406683adac8035e53d08b4dc0192a (patch) | |
tree | 871f197c9b3896ee27b62f946ee1b42f7062ceb9 /generic/tclBasic.c | |
parent | aa93fba41a6764dce6c1f918388efd0f46136ada (diff) | |
download | tcl-e246b44499e406683adac8035e53d08b4dc0192a.zip tcl-e246b44499e406683adac8035e53d08b4dc0192a.tar.gz tcl-e246b44499e406683adac8035e53d08b4dc0192a.tar.bz2 |
Deprecate internal macro's TclIsInfinite() and TclIsNan(), since C99 has isinf() and isnan()
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 714bd80..ae7a3dc 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -7841,7 +7841,7 @@ ExprSqrtFunc( if (code != TCL_OK) { return TCL_ERROR; } - if ((d >= 0.0) && TclIsInfinite(d) + if ((d >= 0.0) && isinf(d) && (Tcl_GetBignumFromObj(NULL, objv[1], &big) == TCL_OK)) { mp_int root; mp_err err; @@ -7906,12 +7906,12 @@ CheckDoubleResult( double dResult) { #ifndef ACCEPT_NAN - if (TclIsNaN(dResult)) { + if (isnan(dResult)) { TclExprFloatError(interp, dResult); return TCL_ERROR; } #endif - if ((errno == ERANGE) && ((dResult == 0.0) || TclIsInfinite(dResult))) { + if ((errno == ERANGE) && ((dResult == 0.0) || isinf(dResult))) { /* * When ERANGE signals under/overflow, just accept 0.0 or +/-Inf */ |