diff options
author | 2009-10-06 09:27:01 -0400 | |
---|---|---|
committer | 2009-10-06 09:27:01 -0400 | |
commit | 24e1d3266a9108f2b0bd348d1ebb09dc324b0eed (patch) | |
tree | 003a9aad956b368f8d996a686c5ca5b888c7bb5b /test | |
parent | 80ede36b2402e4f3015d8b99843fa6cdc124ca3c (diff) | |
parent | 4cf73660273fa8c1ea9db4e41bc576f93fd0ccc9 (diff) |
merge
Diffstat (limited to 'test')
-rw-r--r-- | test/stable_norm.cpp | 15 | ||||
-rw-r--r-- | test/testsuite.cmake | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/test/stable_norm.cpp b/test/stable_norm.cpp index 726512ec0..6ce99477d 100644 --- a/test/stable_norm.cpp +++ b/test/stable_norm.cpp @@ -33,6 +33,21 @@ template<typename MatrixType> void stable_norm(const MatrixType& m) typedef typename MatrixType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; + // Check the basic machine-dependent constants. + { + int nbig, ibeta, it, iemin, iemax, iexp; + RealScalar abig, eps; + + ibeta = std::numeric_limits<RealScalar>::radix; // base for floating-point numbers + it = std::numeric_limits<RealScalar>::digits; // number of base-beta digits in mantissa + iemin = std::numeric_limits<RealScalar>::min_exponent; // minimum exponent + iemax = std::numeric_limits<RealScalar>::max_exponent; // maximum exponent + + VERIFY( (!(iemin > 1 - 2*it || 1+it>iemax || (it==2 && ibeta<5) || (it<=4 && ibeta <= 3 ) || it<2)) + && "the stable norm algorithm cannot be guaranteed on this computer"); + } + + int rows = m.rows(); int cols = m.cols(); diff --git a/test/testsuite.cmake b/test/testsuite.cmake index 147b82d46..b223345b1 100644 --- a/test/testsuite.cmake +++ b/test/testsuite.cmake @@ -177,7 +177,7 @@ if(WIN32 AND NOT UNIX) SET (CTEST_INITIAL_CACHE " MAKECOMMAND:STRING=nmake -i CMAKE_MAKE_PROGRAM:FILEPATH=nmake - CMAKE_GENERATOR:INTERNAL=NMake Makefiles + CMAKE_GENERATOR:INTERNAL=NMake Makefiles CMAKE_BUILD_TYPE:STRING=Release BUILDNAME:STRING=${EIGEN_BUILD_STRING} SITE:STRING=${EIGEN_SITE} |