Mercurial > octave-nkf
diff liboctave/lo-cieee.c @ 4075:9a2102864eb0
[project @ 2002-09-27 21:37:56 by jwe]
author | jwe |
---|---|
date | Fri, 27 Sep 2002 21:37:56 +0000 |
parents | a67f76924703 |
children | cbac6756967e |
line wrap: on
line diff
--- a/liboctave/lo-cieee.c Fri Sep 27 21:06:02 2002 +0000 +++ b/liboctave/lo-cieee.c Fri Sep 27 21:37:56 2002 +0000 @@ -72,7 +72,7 @@ lo_ieee_isnan (double x) { #if defined (HAVE_ISNAN) - return lo_ieee_isnan (x) ? ! lo_ieee_is_NA (x) : 0; + return isnan (x) ? ! lo_ieee_is_NA (x) : 0; #else return 0; #endif @@ -102,6 +102,20 @@ #endif } +int +lo_ieee_is_NA (double x) +{ + lo_ieee_double t; + t.value = x; + return (isnan (x) && t.word[lo_ieee_lw] == LO_IEEE_NA_LW) ? 1 : 0; +} + +int +lo_ieee_is_NaN_or_NA (double x) +{ + return lo_ieee_isnan (x); +} + /* ;;; Local Variables: *** ;;; mode: C++ ***