|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66837 - trunk/libs/math/test
From: pbristow_at_[hidden]
Date: 2010-11-29 05:06:54
Author: pbristow
Date: 2010-11-29 05:06:52 EST (Mon, 29 Nov 2010)
New Revision: 66837
URL: http://svn.boost.org/trac/boost/changeset/66837
Log:
Changed tolerance to explicitly cast 1e-4 to RealType to try to remove gcc long double test failures.
Text files modified:
trunk/libs/math/test/test_inverse_gaussian.cpp | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
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-29 05:06:52 EST (Mon, 29 Nov 2010)
@@ -83,7 +83,8 @@
void test_spots(RealType)
{
// Basic sanity checks
- RealType tolerance = 1e-4f; //
+ RealType tolerance = static_cast<RealType>(1e-4L); //
+ cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << endl;
// Check some bad parameters to the distribution,
BOOST_CHECK_THROW(boost::math::inverse_gaussian_distribution<RealType> nbad1(0, 0), std::domain_error); // zero scale
@@ -115,10 +116,7 @@
BOOST_CHECK_THROW(quantile(w11, +std::numeric_limits<RealType>::quiet_NaN()), std::domain_error); // p = + infinity
BOOST_CHECK_THROW(quantile(complement(w11, +std::numeric_limits<RealType>::quiet_NaN())), std::domain_error); // p = + infinity
}
-
- // cout << "Tolerance for type " << typeid(RealType).name() << " is " << tolerance << endl;
-
- // Check complements.
+ // Check complements.
BOOST_CHECK_CLOSE_FRACTION(
cdf(complement(w11, 1.)), static_cast<RealType>(1) - cdf(w11, 1.), tolerance); // cdf complement
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