Mercurial > octave-nkf
diff liboctave/lo-cieee.c @ 4469:53ee020af847
[project @ 2003-07-26 03:45:10 by jwe]
author | jwe |
---|---|
date | Sat, 26 Jul 2003 03:45:11 +0000 |
parents | cbac6756967e |
children | 093e39f03506 |
line wrap: on
line diff
--- a/liboctave/lo-cieee.c Tue Jul 15 19:18:20 2003 +0000 +++ b/liboctave/lo-cieee.c Sat Jul 26 03:45:11 2003 +0000 @@ -117,15 +117,22 @@ int lo_ieee_is_NA (double x) { +#if defined HAVE_ISNAN lo_ieee_double t; t.value = x; return (isnan (x) && t.word[lo_ieee_lw] == LO_IEEE_NA_LW) ? 1 : 0; +#else + return 0; +#endif } int lo_ieee_is_NaN_or_NA (double x) { - return lo_ieee_isnan (x); + // Although NA really is an IEEE NaN value, lo_ieee_isnan pretends + // it is not, so we much check both... + + return lo_ieee_isnan (x) || lo_ieee_is_NA (x); } double