mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Correct concept failures.
This commit is contained in:
@@ -26,7 +26,6 @@ inline T powm1_imp(const T x, const T y, const Policy& pol)
|
||||
{
|
||||
BOOST_MATH_STD_USING
|
||||
static const char* function = "boost::math::powm1<%1%>(%1%, %1%)";
|
||||
|
||||
if (x > 0)
|
||||
{
|
||||
if ((fabs(y * (x - 1)) < 0.5) || (fabs(y) < 0.2))
|
||||
@@ -41,7 +40,7 @@ inline T powm1_imp(const T x, const T y, const Policy& pol)
|
||||
// fall through....
|
||||
}
|
||||
}
|
||||
else if (boost::math::signbit(x)) // Need to error check -0 here as well
|
||||
else if ((boost::math::signbit)(x)) // Need to error check -0 here as well
|
||||
{
|
||||
// y had better be an integer:
|
||||
if (boost::math::trunc(y) != y)
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error
|
||||
|
||||
#include "math_unit_test.hpp"
|
||||
#include <cmath>
|
||||
#include <boost/math/special_functions/powm1.hpp>
|
||||
|
||||
@@ -71,6 +71,9 @@ struct numeric_limits<boost::math::concepts::std_real_concept>
|
||||
static const bool traps = false;
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_toward_zero;
|
||||
#ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
|
||||
static const int max_digits10 = digits10 + 2;
|
||||
#endif
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user