|
Boost-Commit : |
From: johnmaddock_at_[hidden]
Date: 2007-06-20 11:23:11
Author: johnmaddock
Date: 2007-06-20 11:23:10 EDT (Wed, 20 Jun 2007)
New Revision: 7110
URL: http://svn.boost.org/trac/boost/changeset/7110
Log:
Fix for failing release mode test.
Text files modified:
sandbox/math_toolkit/boost/math/special_functions/beta.hpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
Modified: sandbox/math_toolkit/boost/math/special_functions/beta.hpp
==============================================================================
--- sandbox/math_toolkit/boost/math/special_functions/beta.hpp (original)
+++ sandbox/math_toolkit/boost/math/special_functions/beta.hpp 2007-06-20 11:23:10 EDT (Wed, 20 Jun 2007)
@@ -550,6 +550,8 @@
// Non-normalised, just compute the power:
result = pow(x, a);
}
+ if(result < tools::min_value<T>())
+ return s0; // Safeguard: series can't cope with denorms.
ibeta_series_t<T> s(a, b, x, result);
boost::uintmax_t max_iter = BOOST_MATH_MAX_ITER;
result = boost::math::tools::sum_series(s, boost::math::tools::digits<T>(), max_iter, s0);
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