|
Boost-Commit : |
From: john_at_[hidden]
Date: 2008-07-14 04:51:13
Author: johnmaddock
Date: 2008-07-14 04:51:13 EDT (Mon, 14 Jul 2008)
New Revision: 47416
URL: http://svn.boost.org/trac/boost/changeset/47416
Log:
Fix use of isnan.
Text files modified:
trunk/libs/math/test/test_error_handling.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Modified: trunk/libs/math/test/test_error_handling.cpp
==============================================================================
--- trunk/libs/math/test/test_error_handling.cpp (original)
+++ trunk/libs/math/test/test_error_handling.cpp 2008-07-14 04:51:13 EDT (Mon, 14 Jul 2008)
@@ -143,8 +143,8 @@
BOOST_CHECK_THROW(boost::math::policies::raise_indeterminate_result_error(func, msg1, T(0.0), T(0.0), user_policy), user_defined_error);
// Test with ignore_error
- BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
- BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
+ BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_domain_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
+ BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_pole_error(func, msg1, T(0.0), ignore_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error<T>(func, msg2, ignore_policy), std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>());
BOOST_CHECK_EQUAL(boost::math::policies::raise_underflow_error<T>(func, msg2, ignore_policy), T(0));
BOOST_CHECK_EQUAL(boost::math::policies::raise_denorm_error<T>(func, msg2, T(1.25), ignore_policy), T(1.25));
@@ -153,10 +153,10 @@
// Test with errno_on_error
errno = 0;
- BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_domain_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
+ BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_domain_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
BOOST_CHECK(errno == EDOM);
errno = 0;
- BOOST_CHECK(boost::math::isnan(boost::math::policies::raise_pole_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
+ BOOST_CHECK((boost::math::isnan)(boost::math::policies::raise_pole_error(func, msg1, T(0.0), errno_policy)) || !std::numeric_limits<T>::has_quiet_NaN);
BOOST_CHECK(errno == EDOM);
errno = 0;
BOOST_CHECK_EQUAL(boost::math::policies::raise_overflow_error<T>(func, msg2, errno_policy), std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>());
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