|
Boost-Commit : |
From: john_at_[hidden]
Date: 2007-11-12 05:00:46
Author: johnmaddock
Date: 2007-11-12 05:00:46 EST (Mon, 12 Nov 2007)
New Revision: 41026
URL: http://svn.boost.org/trac/boost/changeset/41026
Log:
Adjust test logic to cope with compilers that don't underflow constants to zero when they should.
Text files modified:
trunk/libs/math/test/test_igamma_inva.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Modified: trunk/libs/math/test/test_igamma_inva.cpp
==============================================================================
--- trunk/libs/math/test/test_igamma_inva.cpp (original)
+++ trunk/libs/math/test/test_igamma_inva.cpp 2007-11-12 05:00:46 EST (Mon, 12 Nov 2007)
@@ -161,14 +161,14 @@
//
if(data[i][5] == 0)
BOOST_CHECK_EQUAL(boost::math::gamma_p_inva(data[i][1], data[i][5]), boost::math::tools::max_value<value_type>());
- else if((1 - data[i][5] > 0.001) && (fabs(data[i][5]) >= boost::math::tools::min_value<value_type>()))
+ else if((1 - data[i][5] > 0.001) && (fabs(data[i][5]) > 2 * boost::math::tools::min_value<value_type>()))
{
value_type inv = boost::math::gamma_p_inva(data[i][1], data[i][5]);
BOOST_CHECK_CLOSE_EX(data[i][0], inv, precision, i);
}
else if(1 == data[i][5])
BOOST_CHECK_EQUAL(boost::math::gamma_p_inva(data[i][1], data[i][5]), boost::math::tools::min_value<value_type>());
- else
+ else if(data[i][3] > 2 * boost::math::tools::min_value<value_type>())
{
// not enough bits in our input to get back to x, but we should be in
// the same ball park:
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