From 4cf73660273fa8c1ea9db4e41bc576f93fd0ccc9 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 6 Oct 2009 10:24:41 +0200 Subject: fix compilation in stable norm, move a platform check to the unit tests --- Eigen/src/Core/StableNorm.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'Eigen') diff --git a/Eigen/src/Core/StableNorm.h b/Eigen/src/Core/StableNorm.h index facab9dbd..b4a5d0bfd 100644 --- a/Eigen/src/Core/StableNorm.h +++ b/Eigen/src/Core/StableNorm.h @@ -108,21 +108,15 @@ MatrixBase::blueNorm() const iemax = std::numeric_limits::max_exponent; // maximum exponent rbig = std::numeric_limits::max(); // largest floating-point number - // Check the basic machine-dependent constants. - if(iemin > 1 - 2*it || 1+it>iemax || (it==2 && ibeta<5) - || (it<=4 && ibeta <= 3 ) || it<2) - { - ei_assert(false && "the algorithm cannot be guaranteed on this computer"); - } iexp = -((1-iemin)/2); - b1 = RealScalar(std::pow(double(ibeta),iexp)); // lower boundary of midrange + b1 = RealScalar(std::pow(ibeta,iexp)); // lower boundary of midrange iexp = (iemax + 1 - it)/2; - b2 = RealScalar(std::pow(double(ibeta),iexp)); // upper boundary of midrange + b2 = RealScalar(std::pow(ibeta,iexp)); // upper boundary of midrange iexp = (2-iemin)/2; - s1m = RealScalar(std::pow(double(ibeta),iexp)); // scaling factor for lower range + s1m = RealScalar(std::pow(ibeta,iexp)); // scaling factor for lower range iexp = - ((iemax+it)/2); - s2m = RealScalar(std::pow(double(ibeta),iexp)); // scaling factor for upper range + s2m = RealScalar(std::pow(ibeta,iexp)); // scaling factor for upper range overfl = rbig*s2m; // overfow boundary for abig eps = RealScalar(std::pow(double(ibeta), 1-it)); -- cgit v1.2.3