Mercurial > hg > octave-terminal
changeset 9003:0631d397fbe0
replace lo_ieee_isnan by xisnan, add missing includes
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sat, 21 Mar 2009 20:46:21 +0100 |
parents | 5cc15e4b4e5c |
children | 17ba311ef110 |
files | liboctave/Array-d.cc liboctave/Array-f.cc liboctave/CDiagMatrix.cc liboctave/ChangeLog liboctave/fCDiagMatrix.cc liboctave/oct-inttypes.cc liboctave/oct-inttypes.h src/ChangeLog src/DLD-FUNCTIONS/__glpk__.cc src/DLD-FUNCTIONS/__lin_interpn__.cc src/DLD-FUNCTIONS/__voronoi__.cc src/ov-base-diag.cc src/sparse-xdiv.cc |
diffstat | 13 files changed, 37 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array-d.cc +++ b/liboctave/Array-d.cc @@ -27,7 +27,7 @@ // Instantiate Arrays of double values. -#include "lo-ieee.h" +#include "lo-mappers.h" #include "Array.h" #include "Array.cc" #include "oct-locbuf.h" @@ -40,19 +40,19 @@ inline bool sort_isnan<double> (double x) { - return lo_ieee_isnan (x); + return xisnan (x); } static bool nan_ascending_compare (double x, double y) { - return lo_ieee_isnan (y) ? ! lo_ieee_isnan (x) : x < y; + return xisnan (y) ? ! xisnan (x) : x < y; } static bool nan_descending_compare (double x, double y) { - return lo_ieee_isnan (x) ? ! lo_ieee_isnan (y) : x > y; + return xisnan (x) ? ! xisnan (y) : x > y; } Array<double>::compare_fcn_type
--- a/liboctave/Array-f.cc +++ b/liboctave/Array-f.cc @@ -27,7 +27,7 @@ // Instantiate Arrays of float values. -#include "lo-ieee.h" +#include "lo-mappers.h" #include "Array.h" #include "Array.cc" #include "oct-locbuf.h" @@ -40,19 +40,19 @@ inline bool sort_isnan<float> (float x) { - return lo_ieee_isnan (x); + return xisnan (x); } static bool nan_ascending_compare (float x, float y) { - return lo_ieee_isnan (y) ? ! lo_ieee_isnan (x) : x < y; + return xisnan (y) ? ! xisnan (x) : x < y; } static bool nan_descending_compare (float x, float y) { - return lo_ieee_isnan (x) ? ! lo_ieee_isnan (y) : x > y; + return xisnan (x) ? ! xisnan (y) : x > y; } Array<float>::compare_fcn_type
--- a/liboctave/CDiagMatrix.cc +++ b/liboctave/CDiagMatrix.cc @@ -30,6 +30,7 @@ #include "Array-util.h" #include "lo-error.h" +#include "lo-ieee.h" #include "mx-base.h" #include "mx-inlines.cc" #include "oct-cmplx.h"
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,12 @@ +2009-03-21 Jaroslav Hajek <highegg@gmail.com> + + * Array-d.cc: lo_ieee_isnan -> xisnan. + * Array-f.cc: Ditto. + * oct-inttypes.cc: Ditto. + * oct-inttypes.h: Ditto. + * CDiagMatrix.cc: Add missing include. + * fCDiagMatrix.cc: Ditto. + 2009-03-20 Jaroslav Hajek <highegg@gmail.com>
--- a/liboctave/fCDiagMatrix.cc +++ b/liboctave/fCDiagMatrix.cc @@ -30,6 +30,7 @@ #include "Array-util.h" #include "lo-error.h" +#include "lo-ieee.h" #include "mx-base.h" #include "mx-inlines.cc" #include "oct-cmplx.h"
--- a/liboctave/oct-inttypes.cc +++ b/liboctave/oct-inttypes.cc @@ -407,7 +407,7 @@ { return x / octave_uint64 (static_cast<uint64_t> (2)); } - else if (y < 0 || lo_ieee_isnan (x) || lo_ieee_isinf (x)) + else if (y < 0 || xisnan (x) || xisinf (x)) { return octave_uint64 (x.value () * y); } @@ -442,7 +442,7 @@ { return x / octave_int64 (static_cast<uint64_t> (4*y)); } - else if (lo_ieee_isnan (x) || lo_ieee_isinf (x)) + else if (xisnan (x) || xisinf (x)) { return octave_int64 (x.value () * y); }
--- a/liboctave/oct-inttypes.h +++ b/liboctave/oct-inttypes.h @@ -33,11 +33,11 @@ #include "lo-traits.h" #include "lo-math.h" #include "oct-types.h" -#include "lo-ieee.h" #include "lo-mappers.h" #ifdef OCTAVE_INT_USE_LONG_DOUBLE inline long double xround (long double x) { return roundl (x); } +inline long double xisnan (long double x) { return xisnan (static_cast<double> (x)); } #endif // Undefine min/max if needed (this may happen under Windows) @@ -289,7 +289,7 @@ // Compute proper thresholds. static const S thmin = compute_threshold (static_cast<S> (min_val ()), min_val ()); static const S thmax = compute_threshold (static_cast<S> (max_val ()), max_val ()); - if (lo_ieee_isnan (value)) + if (xisnan (value)) { fnan = true; return static_cast<T> (0);
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2009-03-21 Jaroslav Hajek <highegg@gmail.com> + + * ov-base-diag.cc: Add missing include. + * sparse-xdiv.cc: Ditto. + * DLD-FUNCTIONS/__glpk__.cc: Ditto. + * DLD-FUNCTIONS/__lin_interpn__.cc: Ditto. + * DLD-FUNCTIONS/__voronoi__.cc: Ditto. + 2009-03-20 Jaroslav Hajek <highegg@gmail.com> * ov-re-mat.cc (octave_matrix::load_ascii): Simplify.
--- a/src/DLD-FUNCTIONS/__glpk__.cc +++ b/src/DLD-FUNCTIONS/__glpk__.cc @@ -28,6 +28,8 @@ #include <csetjmp> #include <ctime> +#include "lo-ieee.h" + #include "defun-dld.h" #include "error.h" #include "gripes.h"
--- a/src/DLD-FUNCTIONS/__lin_interpn__.cc +++ b/src/DLD-FUNCTIONS/__lin_interpn__.cc @@ -24,6 +24,7 @@ #include <config.h> #endif +#include "lo-ieee.h" #include "dNDArray.h" #include "oct-locbuf.h"
--- a/src/DLD-FUNCTIONS/__voronoi__.cc +++ b/src/DLD-FUNCTIONS/__voronoi__.cc @@ -34,6 +34,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif +#include "lo-ieee.h" #include "oct.h" #include "Cell.h"