$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r66885 - trunk/libs/math/test
From: pbristow_at_[hidden]
Date: 2010-11-30 05:03:03
Author: pbristow
Date: 2010-11-30 05:03:01 EST (Tue, 30 Nov 2010)
New Revision: 66885
URL: http://svn.boost.org/trac/boost/changeset/66885
Log:
Check before using max_digits10
Text files modified: 
   trunk/libs/math/test/test_geometric.cpp        |     2 +-                                      
   trunk/libs/math/test/test_inverse_gaussian.cpp |     6 +++---                                  
   2 files changed, 4 insertions(+), 4 deletions(-)
Modified: trunk/libs/math/test/test_geometric.cpp
==============================================================================
--- trunk/libs/math/test/test_geometric.cpp	(original)
+++ trunk/libs/math/test/test_geometric.cpp	2010-11-30 05:03:01 EST (Tue, 30 Nov 2010)
@@ -190,7 +190,7 @@
   RealType tolerance = (std::max)
     (boost::math::tools::epsilon<RealType>(),
     static_cast<RealType>(std::numeric_limits<double>::epsilon()));
-  tolerance *= 10.f; // 10 eps
+  tolerance *= 10; // 10 eps
 
   cout << "Tolerance = " << tolerance << "." << endl;
 
Modified: trunk/libs/math/test/test_inverse_gaussian.cpp
==============================================================================
--- trunk/libs/math/test/test_inverse_gaussian.cpp	(original)
+++ trunk/libs/math/test/test_inverse_gaussian.cpp	2010-11-30 05:03:01 EST (Tue, 30 Nov 2010)
@@ -152,7 +152,7 @@
     static_cast<RealType>(2.6666666666666666666666666666666666666666666666666666666667L), tolfeweps);
   // std deviation:
   BOOST_CHECK_CLOSE_FRACTION(standard_deviation(dist), 
-    static_cast<RealType>(1.632993L), tolerance);
+    static_cast<RealType>(1.632993L), 1000 * tolerance);
   //// hazard:
   //BOOST_CHECK_CLOSE_FRACTION(hazard(dist, x),
   //  pdf(dist, x) / cdf(complement(dist, x)), tolerance);
@@ -330,13 +330,13 @@
   BOOST_CHECK_CLOSE_FRACTION(
     cdf(w0110, 1.), static_cast<double>(1), tolfeweps ); // cdf
   BOOST_CHECK_CLOSE_FRACTION(
-     cdf(complement(w0110, 1.)), static_cast<double>(3.2787685715328683e-179), tolfeweps ); // cdf complement
+     cdf(complement(w0110, 1.)), static_cast<double>(3.2787685715328683e-179), 100* tolfeweps ); // cdf complement
   // Differs because of loss of accuracy
 
   BOOST_CHECK_CLOSE_FRACTION(
     pdf(w0110, 0.1), static_cast<double>(39.894228040143268), tolfeweps ); // pdf
   BOOST_CHECK_CLOSE_FRACTION(
-    cdf(w0110, 0.1), static_cast<double>(0.51989761564832704), tolfeweps ); // cdf
+    cdf(w0110, 0.1), static_cast<double>(0.51989761564832704), 10 * tolfeweps ); // cdf
 
     // Basic sanity-check spot values for all floating-point types..
   // (Parameter value, arbitrarily zero, only communicates the floating point type).