Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59082 - sandbox/numeric_bindings-v1/libs/numeric/bindings/lapack/test
From: thomas.klimpel_at_[hidden]
Date: 2010-01-16 18:02:25


Author: klimpel
Date: 2010-01-16 18:02:25 EST (Sat, 16 Jan 2010)
New Revision: 59082
URL: http://svn.boost.org/trac/boost/changeset/59082

Log:
Relaxed accuracy requirements slightly
Text files modified:
   sandbox/numeric_bindings-v1/libs/numeric/bindings/lapack/test/ublas_steqr.cpp | 7 +++++--
   1 files changed, 5 insertions(+), 2 deletions(-)

Modified: sandbox/numeric_bindings-v1/libs/numeric/bindings/lapack/test/ublas_steqr.cpp
==============================================================================
--- sandbox/numeric_bindings-v1/libs/numeric/bindings/lapack/test/ublas_steqr.cpp (original)
+++ sandbox/numeric_bindings-v1/libs/numeric/bindings/lapack/test/ublas_steqr.cpp 2010-01-16 18:02:25 EST (Sat, 16 Jan 2010)
@@ -30,6 +30,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 );
@@ -46,14 +47,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 ;
      }
    }
 
@@ -64,7 +65,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