Mercurial > octave
diff libinterp/corefcn/pr-output.cc @ 23564:7049da1648c0
Deprecate octave::math::finite in favor of octave::math::isfinite.
New name matches is clearer about what function does as it matches both
Octave's m-file language and C++11.
* lo-mappers.h (isfinite): Declare new function isfinite for double, float, and
std::complex types. Use OCTAVE_DEPRECATED macro for declarations of finite
function. Replace uses of octave::math::finite with octave::math::isfinite.
* lo-mappers.cc (isfinite): Implement new function isfinite for double and float
types.
* lo-mappers.cc (finite): Delete function finite for double and float types.
* gl-render.cc, graphics.cc, graphics.in.h, ls-mat5.cc, pr-output.cc,
quadcc.cc, ov-complex.cc, ov-cx-sparse.cc, ov-float.cc, ov-flt-complex.cc,
ov-re-sparse.cc, ov-scalar.cc, CNDArray.cc, Range.h, dNDArray.cc, fCNDArray.cc,
fNDArray.cc, lo-specfun.cc, oct-rand.cc, mx-inlines.cc, lo-utils.cc:
Replace uses of octave::math::finite with octave::math::isfinite.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 08 Jun 2017 15:56:46 -0700 |
parents | b6498c088fca |
children | 3a730821e4a2 |
line wrap: on
line diff
--- a/libinterp/corefcn/pr-output.cc Thu Jun 08 18:21:07 2017 -0400 +++ b/libinterp/corefcn/pr-output.cc Thu Jun 08 15:56:46 2017 -0700 @@ -508,7 +508,7 @@ for (octave_idx_type i = 0; i < nr; i++) { double val = m(i,j); - if (! octave::math::finite (val)) + if (! octave::math::isfinite (val)) continue; all_inf_or_nan = false; @@ -537,7 +537,7 @@ for (octave_idx_type i = 0; i < nr; i++) { double val = m(i,j); - if (! octave::math::finite (val)) + if (! octave::math::isfinite (val)) continue; all_inf_or_nan = false; @@ -1002,10 +1002,10 @@ double r_abs = (rp < 0.0 ? -rp : rp); double i_abs = (ip < 0.0 ? -ip : ip); - int r_x = (! octave::math::finite (rp) + int r_x = (! octave::math::isfinite (rp) || r_abs == 0.0) ? 0 : num_digits (r_abs); - int i_x = (! octave::math::finite (ip) + int i_x = (! octave::math::isfinite (ip) || i_abs == 0.0) ? 0 : num_digits (i_abs); int x_max, x_min;