Mercurial > hg > octave-lojdl
changeset 5389:25c8956d2204
[project @ 2005-06-15 03:45:46 by jwe]
author | jwe |
---|---|
date | Wed, 15 Jun 2005 03:45:49 +0000 |
parents | 7099eb9841b4 |
children | e81543fdbe01 |
files | ChangeLog configure.in liboctave/CMatrix.cc liboctave/CNDArray.cc liboctave/CSparse.cc liboctave/ChangeLog liboctave/dMatrix.cc liboctave/dNDArray.cc liboctave/dSparse.cc liboctave/lo-cieee.c liboctave/lo-ieee.h liboctave/lo-mappers.cc liboctave/lo-mappers.h src/ChangeLog src/ls-mat5.cc src/mappers.cc src/oct-stream.cc src/pr-output.cc |
diffstat | 18 files changed, 110 insertions(+), 107 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-06-14 John W. Eaton <jwe@octave.org> + + * configure.in (AH_BOTTOM): Also define GCC_ATTR_DEPRECATED. + 2005-06-02 John W. Eaton <jwe@octave.org> * Makeconf.in (do-subst-default-vals): Substitute
--- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.478 $) +AC_REVISION($Revision: 1.479 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -1470,9 +1470,11 @@ AH_BOTTOM([ #if defined (__GNUC__) +#define GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) #define GCC_ATTR_NORETURN __attribute__ ((__noreturn__)) #define GCC_ATTR_UNUSED __attribute__ ((__unused__)) #else +#define GCC_ATTR_DEPRECATED #define GCC_ATTR_NORETURN #define GCC_ATTR_UNUSED #endif
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -2607,9 +2607,9 @@ double r_val = std::real (val); double i_val = std::imag (val); - if ((! (octave_is_NaN_or_NA (r_val) || xisinf (r_val)) + if ((! (xisnan (r_val) || xisinf (r_val)) && fabs (r_val) > FLT_MAX) - || (! (octave_is_NaN_or_NA (i_val) || xisinf (i_val)) + || (! (xisnan (i_val) || xisinf (i_val)) && fabs (i_val) > FLT_MAX)) return true; } @@ -2806,7 +2806,7 @@ { tmp_min = elem (i, idx_j); - if (! octave_is_NaN_or_NA (tmp_min)) + if (! xisnan (tmp_min)) { abs_min = real_only ? std::real (tmp_min) : std::abs (tmp_min); break; @@ -2817,7 +2817,7 @@ { Complex tmp = elem (i, j); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; double abs_tmp = real_only ? std::real (tmp) : std::abs (tmp); @@ -2830,7 +2830,7 @@ } } - if (octave_is_NaN_or_NA (tmp_min)) + if (xisnan (tmp_min)) { result.elem (i) = Complex_NaN_result; idx_arg.elem (i) = 0; @@ -2880,7 +2880,7 @@ { tmp_max = elem (i, idx_j); - if (! octave_is_NaN_or_NA (tmp_max)) + if (! xisnan (tmp_max)) { abs_max = real_only ? std::real (tmp_max) : std::abs (tmp_max); break; @@ -2891,7 +2891,7 @@ { Complex tmp = elem (i, j); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; double abs_tmp = real_only ? std::real (tmp) : std::abs (tmp); @@ -2904,7 +2904,7 @@ } } - if (octave_is_NaN_or_NA (tmp_max)) + if (xisnan (tmp_max)) { result.elem (i) = Complex_NaN_result; idx_arg.elem (i) = 0; @@ -2954,7 +2954,7 @@ { tmp_min = elem (idx_i, j); - if (! octave_is_NaN_or_NA (tmp_min)) + if (! xisnan (tmp_min)) { abs_min = real_only ? std::real (tmp_min) : std::abs (tmp_min); break; @@ -2965,7 +2965,7 @@ { Complex tmp = elem (i, j); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; double abs_tmp = real_only ? std::real (tmp) : std::abs (tmp); @@ -2978,7 +2978,7 @@ } } - if (octave_is_NaN_or_NA (tmp_min)) + if (xisnan (tmp_min)) { result.elem (j) = Complex_NaN_result; idx_arg.elem (j) = 0; @@ -3028,7 +3028,7 @@ { tmp_max = elem (idx_i, j); - if (! octave_is_NaN_or_NA (tmp_max)) + if (! xisnan (tmp_max)) { abs_max = real_only ? std::real (tmp_max) : std::abs (tmp_max); break; @@ -3039,7 +3039,7 @@ { Complex tmp = elem (i, j); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; double abs_tmp = real_only ? std::real (tmp) : std::abs (tmp); @@ -3052,7 +3052,7 @@ } } - if (octave_is_NaN_or_NA (tmp_max)) + if (xisnan (tmp_max)) { result.elem (j) = Complex_NaN_result; idx_arg.elem (j) = 0;
--- a/liboctave/CNDArray.cc +++ b/liboctave/CNDArray.cc @@ -594,9 +594,9 @@ double r_val = std::real (val); double i_val = std::imag (val); - if ((! (octave_is_NaN_or_NA (r_val) || xisinf (r_val)) + if ((! (xisnan (r_val) || xisinf (r_val)) && fabs (r_val) > FLT_MAX) - || (! (octave_is_NaN_or_NA (i_val) || xisinf (i_val)) + || (! (xisnan (i_val) || xisinf (i_val)) && fabs (i_val) > FLT_MAX)) return true; } @@ -735,7 +735,7 @@ { tmp_max = elem (idx_j * x_stride + x_offset); - if (! octave_is_NaN_or_NA (tmp_max)) + if (! xisnan (tmp_max)) { abs_max = std::abs(tmp_max); break; @@ -746,7 +746,7 @@ { Complex tmp = elem (j * x_stride + x_offset); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; double abs_tmp = std::abs (tmp); @@ -759,7 +759,7 @@ } } - if (octave_is_NaN_or_NA (tmp_max)) + if (xisnan (tmp_max)) { result.elem (i) = Complex_NaN_result; idx_arg.elem (i) = 0; @@ -827,7 +827,7 @@ { tmp_min = elem (idx_j * x_stride + x_offset); - if (! octave_is_NaN_or_NA (tmp_min)) + if (! xisnan (tmp_min)) { abs_min = std::abs(tmp_min); break; @@ -838,7 +838,7 @@ { Complex tmp = elem (j * x_stride + x_offset); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; double abs_tmp = std::abs (tmp); @@ -851,7 +851,7 @@ } } - if (octave_is_NaN_or_NA (tmp_min)) + if (xisnan (tmp_min)) { result.elem (i) = Complex_NaN_result; idx_arg.elem (i) = 0;
--- a/liboctave/CSparse.cc +++ b/liboctave/CSparse.cc @@ -235,12 +235,12 @@ { Complex tmp = data (i); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; double abs_tmp = std::abs (tmp); - if (octave_is_NaN_or_NA (abs_max) || abs_tmp > abs_max) + if (xisnan (abs_max) || abs_tmp > abs_max) { idx_j = ridx (i); tmp_max = tmp; @@ -248,7 +248,7 @@ } } - idx_arg.elem (j) = octave_is_NaN_or_NA (tmp_max) ? 0 : idx_j; + idx_arg.elem (j) = xisnan (tmp_max) ? 0 : idx_j; if (abs_max != 0.) nel++; } @@ -301,7 +301,7 @@ octave_idx_type ix = idx_arg.elem (ir); Complex tmp = data (i); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (ix == -1 || std::abs(tmp) > std::abs(elem (ir, ix))) idx_arg.elem (ir) = j; @@ -387,12 +387,12 @@ { Complex tmp = data (i); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; double abs_tmp = std::abs (tmp); - if (octave_is_NaN_or_NA (abs_min) || abs_tmp < abs_min) + if (xisnan (abs_min) || abs_tmp < abs_min) { idx_j = ridx (i); tmp_min = tmp; @@ -400,7 +400,7 @@ } } - idx_arg.elem (j) = octave_is_NaN_or_NA (tmp_min) ? 0 : idx_j; + idx_arg.elem (j) = xisnan (tmp_min) ? 0 : idx_j; if (abs_min != 0.) nel++; } @@ -453,7 +453,7 @@ octave_idx_type ix = idx_arg.elem (ir); Complex tmp = data (i); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (ix == -1 || std::abs(tmp) < std::abs(elem (ir, ix))) idx_arg.elem (ir) = j;
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,15 @@ 2005-06-14 John W. Eaton <jwe@octave.org> + * CMatrix.cc, CNDArray.cc, CSparse.cc, dMatrix.cc, dNDArray.cc, + dSparse.cc, lo-cieee.c, lo-mappers.cc: Change all uses of + octave_is_NaN_or_NA to xisnan. + + * lo-mappers.h (octave_is_NaN_or_NA): Mark with GCC_ATTR_DEPRECATED. + * lo-ieee.h (lo_ieee_is_NaN_or_NA): Likewise. + + * lo-cieee.c (lo_ieee_is_NaN_or_NA): Now just a wrapper for + lo_ieee_isnan. + * dMatrix.cc (Matrix::too_large_for_float): Only check if abs value is greater than FLT_MAX. * CMatrix.cc (ComplexMatrix::too_large_for_float): Ditto.
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -2114,7 +2114,7 @@ { double val = elem (i); - if (! (octave_is_NaN_or_NA (val) || xisinf (val)) + if (! (xisnan (val) || xisinf (val)) && fabs (val) > FLT_MAX) return true; } @@ -2270,7 +2270,7 @@ { tmp_min = elem (i, idx_j); - if (! octave_is_NaN_or_NA (tmp_min)) + if (! xisnan (tmp_min)) break; } @@ -2278,7 +2278,7 @@ { double tmp = elem (i, j); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (tmp < tmp_min) { @@ -2288,7 +2288,7 @@ } result.elem (i) = tmp_min; - idx_arg.elem (i) = octave_is_NaN_or_NA (tmp_min) ? 0 : idx_j; + idx_arg.elem (i) = xisnan (tmp_min) ? 0 : idx_j; } } @@ -2325,7 +2325,7 @@ { tmp_max = elem (i, idx_j); - if (! octave_is_NaN_or_NA (tmp_max)) + if (! xisnan (tmp_max)) break; } @@ -2333,7 +2333,7 @@ { double tmp = elem (i, j); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (tmp > tmp_max) { @@ -2343,7 +2343,7 @@ } result.elem (i) = tmp_max; - idx_arg.elem (i) = octave_is_NaN_or_NA (tmp_max) ? 0 : idx_j; + idx_arg.elem (i) = xisnan (tmp_max) ? 0 : idx_j; } } @@ -2380,7 +2380,7 @@ { tmp_min = elem (idx_i, j); - if (! octave_is_NaN_or_NA (tmp_min)) + if (! xisnan (tmp_min)) break; } @@ -2388,7 +2388,7 @@ { double tmp = elem (i, j); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (tmp < tmp_min) { @@ -2398,7 +2398,7 @@ } result.elem (j) = tmp_min; - idx_arg.elem (j) = octave_is_NaN_or_NA (tmp_min) ? 0 : idx_i; + idx_arg.elem (j) = xisnan (tmp_min) ? 0 : idx_i; } } @@ -2435,7 +2435,7 @@ { tmp_max = elem (idx_i, j); - if (! octave_is_NaN_or_NA (tmp_max)) + if (! xisnan (tmp_max)) break; } @@ -2443,7 +2443,7 @@ { double tmp = elem (i, j); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (tmp > tmp_max) { @@ -2453,7 +2453,7 @@ } result.elem (j) = tmp_max; - idx_arg.elem (j) = octave_is_NaN_or_NA (tmp_max) ? 0 : idx_i; + idx_arg.elem (j) = xisnan (tmp_max) ? 0 : idx_i; } }
--- a/liboctave/dNDArray.cc +++ b/liboctave/dNDArray.cc @@ -589,7 +589,7 @@ { double val = elem (i); - if (! (octave_is_NaN_or_NA (val) || xisinf (val)) + if (! (xisnan (val) || xisinf (val)) && fabs (val) > FLT_MAX) return true; } @@ -694,7 +694,7 @@ { tmp_max = elem (idx_j * x_stride + x_offset); - if (! octave_is_NaN_or_NA (tmp_max)) + if (! xisnan (tmp_max)) break; } @@ -702,7 +702,7 @@ { double tmp = elem (j * x_stride + x_offset); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (tmp > tmp_max) { @@ -712,7 +712,7 @@ } result.elem (i) = tmp_max; - idx_arg.elem (i) = octave_is_NaN_or_NA (tmp_max) ? 0 : idx_j; + idx_arg.elem (i) = xisnan (tmp_max) ? 0 : idx_j; } return result; @@ -769,7 +769,7 @@ { tmp_min = elem (idx_j * x_stride + x_offset); - if (! octave_is_NaN_or_NA (tmp_min)) + if (! xisnan (tmp_min)) break; } @@ -777,7 +777,7 @@ { double tmp = elem (j * x_stride + x_offset); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (tmp < tmp_min) { @@ -787,7 +787,7 @@ } result.elem (i) = tmp_min; - idx_arg.elem (i) = octave_is_NaN_or_NA (tmp_min) ? 0 : idx_j; + idx_arg.elem (i) = xisnan (tmp_min) ? 0 : idx_j; } return result;
--- a/liboctave/dSparse.cc +++ b/liboctave/dSparse.cc @@ -226,9 +226,9 @@ { double tmp = data (i); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; - else if (octave_is_NaN_or_NA (tmp_max) || tmp > tmp_max) + else if (xisnan (tmp_max) || tmp > tmp_max) { idx_j = ridx (i); tmp_max = tmp; @@ -236,7 +236,7 @@ } - idx_arg.elem (j) = octave_is_NaN_or_NA (tmp_max) ? 0 : idx_j; + idx_arg.elem (j) = xisnan (tmp_max) ? 0 : idx_j; if (tmp_max != 0.) nel++; } @@ -290,7 +290,7 @@ octave_idx_type ix = idx_arg.elem (ir); double tmp = data (i); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (ix == -1 || tmp > elem (ir, ix)) idx_arg.elem (ir) = j; @@ -372,9 +372,9 @@ { double tmp = data (i); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; - else if (octave_is_NaN_or_NA (tmp_min) || tmp < tmp_min) + else if (xisnan (tmp_min) || tmp < tmp_min) { idx_j = ridx (i); tmp_min = tmp; @@ -382,7 +382,7 @@ } - idx_arg.elem (j) = octave_is_NaN_or_NA (tmp_min) ? 0 : idx_j; + idx_arg.elem (j) = xisnan (tmp_min) ? 0 : idx_j; if (tmp_min != 0.) nel++; } @@ -436,7 +436,7 @@ octave_idx_type ix = idx_arg.elem (ir); double tmp = data (i); - if (octave_is_NaN_or_NA (tmp)) + if (xisnan (tmp)) continue; else if (ix == -1 || tmp < elem (ir, ix)) idx_arg.elem (ir) = j;
--- a/liboctave/lo-cieee.c +++ b/liboctave/lo-cieee.c @@ -85,7 +85,7 @@ lo_ieee_isnan (double x) { #if defined (HAVE_ISNAN) - return isnan (x) ? ! lo_ieee_is_NA (x) : 0; + return isnan (x); #else return 0; #endif @@ -95,11 +95,11 @@ lo_ieee_finite (double x) { #if defined (HAVE_FINITE) - return finite (x) != 0 && ! lo_ieee_is_NaN_or_NA (x); + return finite (x) != 0 && ! lo_ieee_isnan (x); #elif defined (HAVE_ISINF) - return (! isinf (x) && ! lo_ieee_is_NaN_or_NA (x)); + return (! isinf (x) && ! lo_ieee_isnan (x)); #else - return ! lo_ieee_is_NaN_or_NA (x); + return ! lo_ieee_isnan (x); #endif } @@ -109,7 +109,7 @@ #if defined (HAVE_ISINF) return isinf (x); #elif defined (HAVE_FINITE) - return (! (finite (x) || lo_ieee_is_NaN_or_NA (x))); + return (! (finite (x) || lo_ieee_isnan (x))); #else return 0; #endif @@ -130,10 +130,7 @@ int lo_ieee_is_NaN_or_NA (double 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); + return lo_ieee_isnan (x); } double
--- a/liboctave/lo-ieee.h +++ b/liboctave/lo-ieee.h @@ -64,7 +64,7 @@ extern int lo_ieee_isinf (double x); extern int lo_ieee_is_NA (double); -extern int lo_ieee_is_NaN_or_NA (double); +extern int lo_ieee_is_NaN_or_NA (double) GCC_ATTR_DEPRECATED; extern double lo_ieee_inf_value (void); extern double lo_ieee_na_value (void);
--- a/liboctave/lo-mappers.cc +++ b/liboctave/lo-mappers.cc @@ -129,7 +129,7 @@ bool octave_is_NaN_or_NA (double x) { - return lo_ieee_is_NaN_or_NA (x); + return lo_ieee_isnan (x); } // (double, double) -> double mappers. @@ -145,9 +145,9 @@ if (y <= x) return y; - if (octave_is_NaN_or_NA (x) && ! octave_is_NaN_or_NA (y)) + if (xisnan (x) && ! xisnan (y)) return y; - else if (octave_is_NaN_or_NA (y) && ! octave_is_NaN_or_NA (x)) + else if (xisnan (y) && ! xisnan (x)) return x; else if (octave_is_NA (x) || octave_is_NA (y)) return octave_NA; @@ -164,9 +164,9 @@ if (y >= x) return y; - if (octave_is_NaN_or_NA (x) && ! octave_is_NaN_or_NA (y)) + if (xisnan (x) && ! xisnan (y)) return y; - else if (octave_is_NaN_or_NA (y) && ! octave_is_NaN_or_NA (x)) + else if (xisnan (y) && ! xisnan (x)) return x; else if (octave_is_NA (x) || octave_is_NA (y)) return octave_NA; @@ -262,8 +262,8 @@ double rx = real (x); double ix = imag (x); - return (xfinite (rx) && ! octave_is_NaN_or_NA (rx) - && xfinite (ix) && ! octave_is_NaN_or_NA (ix)); + return (xfinite (rx) && ! xisnan (rx) + && xfinite (ix) && ! xisnan (ix)); } bool @@ -281,7 +281,7 @@ bool octave_is_NaN_or_NA (const Complex& x) { - return (octave_is_NaN_or_NA (real (x)) || octave_is_NaN_or_NA (imag (x))); + return (xisnan (real (x)) || xisnan (imag (x))); } // (complex, complex) -> complex mappers.
--- a/liboctave/lo-mappers.h +++ b/liboctave/lo-mappers.h @@ -39,7 +39,7 @@ extern bool xisinf (double x); extern bool octave_is_NA (double x); -extern bool octave_is_NaN_or_NA (double x); +extern bool octave_is_NaN_or_NA (double x) GCC_ATTR_DEPRECATED; extern double xmin (double x, double y); extern double xmax (double x, double y);
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,12 @@ +2005-06-14 John W. Eaton <jwe@octave.org> + + * ls-mat5.cc, mappers.cc, oct-stream.cc, pr-output.cc: Change all + uses of octave_is_NaN_or_NA to xisnan. + 2005-06-14 Keith Goodman <kwgoodman@gmail.com> - * input.cc (get_user_input): Renamed debug commands to dbnext, dbstep, - and dbcont. + * input.cc (get_user_input): Renamed debug commands to dbnext, + dbstep, and dbcont. * pt.cc: Renamed dbg_next to dbnext in comment string. * pt.h: Renamed dbg_next to dbnext in comment string.
--- a/src/ls-mat5.cc +++ b/src/ls-mat5.cc @@ -1243,7 +1243,7 @@ { double tmp = val [i]; - if (! (octave_is_NaN_or_NA (tmp) || xisinf (tmp)) + if (! (xisnan (tmp) || xisinf (tmp)) && fabs (tmp) > FLT_MAX) { too_large_for_float = true;
--- a/src/mappers.cc +++ b/src/mappers.cc @@ -465,7 +465,7 @@ "-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} isna (@var{x})\n\ Return 1 for elements of @var{x} that are NA (missing) values and zero\n\ -otherwise. For example,\n\ +otherwise. For example,\n\ \n\ @example\n\ @group\n\ @@ -475,31 +475,16 @@ @end example\n\ @end deftypefn"); - DEFUN_MAPPER (is_nan_or_na, 0, octave_is_NaN_or_NA, - octave_is_NaN_or_NA, 0, 0, 0, 0.0, 0.0, 0, 0, - "-*- texinfo -*-\n\ -@deftypefn {Mapping Function} {} is_nan_or_na (@var{x})\n\ -Return 1 for elements of @var{x} that are NaN or NA (missing) values\n\ -and zero otherwise. For example,\n\ -\n\ -@example\n\ -@group\n\ -is_NAN_or_NA ([13, Inf, NA, NaN])\n\ - @result{} [ 0, 0, 1, 1 ]\n\ -@end group\n\ -@end example\n\ -@end deftypefn"); - DEFUN_MAPPER (isnan, 0, xisnan, xisnan, 0, 0, 0, 0.0, 0.0, 0, 0, "-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} isnan (@var{x})\n\ Return 1 for elements of @var{x} that are NaN values and zero\n\ -otherwise. For example,\n\ +otherwise. NA values are also considered NaN values. For example,\n\ \n\ @example\n\ @group\n\ isnan ([13, Inf, NA, NaN])\n\ - @result{} [ 0, 0, 0, 1 ]\n\ + @result{} [ 0, 0, 1, 1 ]\n\ @end group\n\ @end example\n\ @end deftypefn");
--- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -70,7 +70,7 @@ if (! error_state) { - if (! lo_ieee_is_NaN_or_NA (dval)) + if (! lo_ieee_isnan (dval)) { int ival = NINT (dval); @@ -93,7 +93,7 @@ { int retval = -1; - if (! lo_ieee_is_NaN_or_NA (d)) + if (! lo_ieee_isnan (d)) { if (! xisinf (d)) { @@ -2558,7 +2558,7 @@ if (val_cache) { - if (lo_ieee_is_NaN_or_NA (val) || xisinf (val) + if (lo_ieee_isnan (val) || xisinf (val) || ((val > INT_MAX || val < INT_MIN) && (elt->type == 'd' || elt->type == 'i' @@ -2570,7 +2570,7 @@ { std::string tfmt = fmt; - if (lo_ieee_is_NaN_or_NA (val) || xisinf (val)) + if (lo_ieee_isnan (val) || xisinf (val)) { tfmt.replace (tfmt.rfind (elt->type), 1, 1, 's');
--- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -259,7 +259,7 @@ for (octave_idx_type i = 0; i < nr; i++) { double val = m(i,j); - if (xisinf (val) || octave_is_NaN_or_NA (val)) + if (xisinf (val) || xisnan (val)) continue; if (val < result) @@ -370,7 +370,7 @@ bool sign = (d < 0.0); - bool inf_or_nan = (xisinf (d) || octave_is_NaN_or_NA (d)); + bool inf_or_nan = (xisinf (d) || xisnan (d)); bool int_only = (! inf_or_nan && D_NINT (d) == d); @@ -2959,7 +2959,7 @@ { double val; if (builtin_real_scalar_variable ("output_max_field_width", val) - && ! octave_is_NaN_or_NA (val)) + && ! xisnan (val)) { int ival = NINT (val); if (ival > 0 && ival == val) @@ -2977,7 +2977,7 @@ { double val; if (builtin_real_scalar_variable ("output_precision", val) - && ! octave_is_NaN_or_NA (val)) + && ! xisnan (val)) { int ival = NINT (val); if (ival >= 0 && ival == val)