Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61966 - in sandbox/numeric_bindings-v1/libs/numeric/bindings: . umfpack/test
From: thomas.klimpel_at_[hidden]
Date: 2010-05-14 08:27:02


Author: klimpel
Date: 2010-05-14 08:27:01 EDT (Fri, 14 May 2010)
New Revision: 61966
URL: http://svn.boost.org/trac/boost/changeset/61966

Log:
removed NO_NAN macro (with the help of <boost/math/special_functions/fpclassify.hpp>)
Text files modified:
   sandbox/numeric_bindings-v1/libs/numeric/bindings/numeric-bindings.jam | 3 +--
   sandbox/numeric_bindings-v1/libs/numeric/bindings/umfpack/test/umf4.cc | 15 ++++-----------
   2 files changed, 5 insertions(+), 13 deletions(-)

Modified: sandbox/numeric_bindings-v1/libs/numeric/bindings/numeric-bindings.jam
==============================================================================
--- sandbox/numeric_bindings-v1/libs/numeric/bindings/numeric-bindings.jam (original)
+++ sandbox/numeric_bindings-v1/libs/numeric/bindings/numeric-bindings.jam 2010-05-14 08:27:01 EDT (Fri, 14 May 2010)
@@ -136,6 +136,5 @@
                 <include>$(UFCONFIG_INCLUDE) ;
 lib umfpack_lib : amd_lib blas_lib
                 : <name>$(UMFPACK_LIB) <search>$(UMFPACK_PATH)
- : : <toolset>msvc:<define>NO_NAN
- <include>$(UMFPACK_INCLUDE)
+ : : <include>$(UMFPACK_INCLUDE)
                    <include>$(UFCONFIG_INCLUDE) ;

Modified: sandbox/numeric_bindings-v1/libs/numeric/bindings/umfpack/test/umf4.cc
==============================================================================
--- sandbox/numeric_bindings-v1/libs/numeric/bindings/umfpack/test/umf4.cc (original)
+++ sandbox/numeric_bindings-v1/libs/numeric/bindings/umfpack/test/umf4.cc 2010-05-14 08:27:01 EDT (Fri, 14 May 2010)
@@ -89,10 +89,7 @@
 #include <cstdlib>
 #include <string>
 #include <algorithm>
-#include <math.h>
-#ifdef __ICC
-# include <mathimf.h>
-#endif
+#include <boost/math/special_functions/fpclassify.hpp>
 #include <boost/numeric/bindings/traits/ublas_vector.hpp>
 #include <boost/numeric/bindings/traits/ublas_sparse.hpp>
 #include <boost/numeric/bindings/umfpack/umfpack.hpp>
@@ -104,7 +101,7 @@
 using std::string;
 using std::ifstream;
 using std::ofstream;
-using std::exit;
+using std::exit;
 
 namespace ublas = boost::numeric::ublas;
 namespace umf = boost::numeric::bindings::umfpack;
@@ -173,22 +170,18 @@
   rnorm = 0.;
   bnorm = 0.;
   for (int i = 0; i < n; i++) {
-#ifndef NO_NAN
- if (isnan (r [i])){
+ if ((boost::math::isnan) (r [i])){
       rnorm = r [i];
       break;
     }
-#endif
     absr = fabs (r [i]);
     rnorm = max (rnorm, absr);
   }
   for (int i = 0; i < n; i++) {
-#ifndef NO_NAN
- if (isnan (b [i])){
+ if ((boost::math::isnan) (b [i])){
       bnorm = b [i];
       break;
     }
-#endif
     absb = fabs (b [i]);
     bnorm = max (bnorm, absb);
   }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk