|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59083 - sandbox/numeric_bindings/libs/numeric/bindings/lapack/test
From: thomas.klimpel_at_[hidden]
Date: 2010-01-16 18:07:23
Author: klimpel
Date: 2010-01-16 18:07:23 EST (Sat, 16 Jan 2010)
New Revision: 59083
URL: http://svn.boost.org/trac/boost/changeset/59083
Log:
Merge from numeric_bindings-v1
Properties modified:
sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_steqr.cpp (contents, props changed)
Text files modified:
sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_steqr.cpp | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
Modified: sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_steqr.cpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_steqr.cpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_steqr.cpp 2010-01-16 18:07:23 EST (Sat, 16 Jan 2010)
@@ -31,6 +31,7 @@
typedef ublas::matrix<T, ublas::column_major> matrix_type ;
typedef ublas::vector<T> vector_type ;
+ real_type safety_factor (1.5);
// Set matrix
matrix_type z( n, n );
@@ -47,14 +48,14 @@
for (int j=0; j<d.size(); ++j) {
sum += z(i,j)*z(i,j) * d(j) ;
}
- if (std::abs( sum - 2.0 ) > 10 * std::numeric_limits<T>::epsilon() ) return 1 ;
+ if (std::abs( sum - 2.0 ) > safety_factor*10 * std::numeric_limits<T>::epsilon() ) return 1 ;
if (i>0) {
sum = 0.0 ;
for (int j=0; j<d.size(); ++j) {
sum += z(i-1,j)*z(i,j) * d(j) ;
}
- if (std::abs( sum + 1.0 ) > 10 * std::numeric_limits<T>::epsilon() ) return 1 ;
+ if (std::abs( sum + 1.0 ) > safety_factor*10 * std::numeric_limits<T>::epsilon() ) return 1 ;
}
}
@@ -65,7 +66,9 @@
int main() {
// Run tests for different value_types
+ std::cout << "float\n" ;
if (do_value_type<float>()) return 255;
+ std::cout << "double\n" ;
if (do_value_type<double>()) return 255;
std::cout << "Regression test succeeded\n" ;
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