$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r50297 - sandbox/libs/numeric/bindings/blas/test
From: thomas.klimpel_at_[hidden]
Date: 2008-12-16 09:51:56
Author: klimpel
Date: 2008-12-16 09:51:55 EST (Tue, 16 Dec 2008)
New Revision: 50297
URL: http://svn.boost.org/trac/boost/changeset/50297
Log:
minor modifications, to let regression tests pass with gfortran
Text files modified: 
   sandbox/libs/numeric/bindings/blas/test/blas1.cpp |    14 ++++++++------                          
   1 files changed, 8 insertions(+), 6 deletions(-)
Modified: sandbox/libs/numeric/bindings/blas/test/blas1.cpp
==============================================================================
--- sandbox/libs/numeric/bindings/blas/test/blas1.cpp	(original)
+++ sandbox/libs/numeric/bindings/blas/test/blas1.cpp	2008-12-16 09:51:55 EST (Tue, 16 Dec 2008)
@@ -241,22 +241,23 @@
   template <typename W>
   int operator()(W& w) const {
      using namespace boost::numeric::bindings::blas ;
+     real_type safety_factor (1.5);
 
      copy_vector( w );
 
      // Test blas routines
      value_type prod = dotc( this->v_, w );
      if ( std::abs(prod - inner_prod( conj(this->v1_ref_), this->v2_ref_ ))
-          > std::numeric_limits< real_type >::epsilon() * std::abs(prod)) return 255 ;
+          > safety_factor*std::numeric_limits< real_type >::epsilon() * std::abs(prod)) return 255 ;
 
      prod = dotu( this->v_, w );
      if ( std::abs(prod - inner_prod( this->v1_ref_, this->v2_ref_ ))
-          > std::numeric_limits< real_type >::epsilon() * std::abs(prod)) return 255 ;
+          > safety_factor*std::numeric_limits< real_type >::epsilon() * std::abs(prod)) return 255 ;
 
      axpy( value_type(2.0), this->v_, w );
      for (size_t i=0; i<this->size(); ++i)
         if ( std::abs(w[i] - (this->v2_ref_(i) + value_type(2.0)*this->v1_ref_(i)))
-          > std::numeric_limits< real_type >::epsilon() * std::abs(w[i])) return 255 ;
+          > safety_factor*std::numeric_limits< real_type >::epsilon() * std::abs(w[i])) return 255 ;
 
      scal( value_type(0.0), w ) ;
      copy( this->v_, w ) ;
@@ -285,22 +286,23 @@
   template <typename W>
   int operator()(W& w) const {
      using namespace boost::numeric::bindings::blas ;
+     real_type safety_factor (1.5);
 
      copy_vector( w );
 
      // Test blas routines
      value_type prod = dotc( this->v_, w );
      if ( std::abs(prod - inner_prod( conj(this->v1_ref_), this->v2_ref_ ))
-          > std::numeric_limits< real_type >::epsilon() * std::abs(prod)) return 255 ;
+          > safety_factor*std::numeric_limits< real_type >::epsilon() * std::abs(prod)) return 255 ;
 
      prod = dotu( this->v_, w );
      if ( std::abs(prod - inner_prod( this->v1_ref_, this->v2_ref_ ))
-          > std::numeric_limits< real_type >::epsilon() * std::abs(prod)) return 255 ;
+          > safety_factor*std::numeric_limits< real_type >::epsilon() * std::abs(prod)) return 255 ;
 
      axpy( value_type(2.0), this->v_, w );
      for (size_t i=0; i<this->size(); ++i)
         if ( std::abs(w[i] - (this->v2_ref_(i) + value_type(2.0)*this->v1_ref_(i)))
-          > std::numeric_limits< real_type >::epsilon() * std::abs(w[i])) return 255 ;
+          > safety_factor*std::numeric_limits< real_type >::epsilon() * std::abs(w[i])) return 255 ;
 
      scal( value_type(0.0), w ) ;
      copy( this->v_, w ) ;