|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r78790 - trunk/libs/math/test
From: john_at_[hidden]
Date: 2012-06-01 07:58:57
Author: johnmaddock
Date: 2012-06-01 07:58:56 EDT (Fri, 01 Jun 2012)
New Revision: 78790
URL: http://svn.boost.org/trac/boost/changeset/78790
Log:
Fix for GCC/Linux failure.
Text files modified:
trunk/libs/math/test/test_out_of_range.hpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Modified: trunk/libs/math/test/test_out_of_range.hpp
==============================================================================
--- trunk/libs/math/test/test_out_of_range.hpp (original)
+++ trunk/libs/math/test/test_out_of_range.hpp 2012-06-01 07:58:56 EDT (Fri, 01 Jun 2012)
@@ -41,7 +41,7 @@
typedef typename Distro::value_type value_type;
if((boost::math::isfinite)(range(d).first) && (range(d).first != -boost::math::tools::max_value<value_type>()))
{ // If possible, check that a random variable value just less than the bottom of the supported range throws domain errors.
- value_type m = boost::math::float_prior(range(d).first);
+ value_type m = (range(d).first == 0) ? -boost::math::tools::min_value<value_type>() : boost::math::float_prior(range(d).first);
BOOST_ASSERT(m != range(d).first);
BOOST_ASSERT(m < range(d).first);
BOOST_CHECK_THROW(pdf(d, m), std::domain_error);
@@ -50,7 +50,7 @@
}
if((boost::math::isfinite)(range(d).second) && (range(d).second != boost::math::tools::max_value<value_type>()))
{ // If possible, check that a random variable value just more than the top of the supported range throws domain errors.
- value_type m = boost::math::float_next(range(d).second);
+ value_type m = (range(d).second == 0) ? boost::math::tools::min_value<value_type>() : boost::math::float_next(range(d).second);
BOOST_ASSERT(m != range(d).first);
BOOST_ASSERT(m > range(d).first);
BOOST_CHECK_THROW(pdf(d, m), std::domain_error);
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