Skip to content

Commit b57749d

Browse files
committed
Fix casting errors
1 parent e62a284 commit b57749d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/boost/math/special_functions/chebyshev.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ template <typename T, typename std::enable_if<!std::is_arithmetic<T>::value, boo
5353
T expt(T p, unsigned q)
5454
{
5555
using std::pow;
56-
return static_cast<T>(pow(p, q));
56+
return pow(p, static_cast<int>(q));
5757
}
5858

5959
template<class Real, bool second, class Policy>

include/boost/math/special_functions/sqrt1pm1.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ inline typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy
2626
typedef typename tools::promote_args<T>::type result_type;
2727
BOOST_MATH_STD_USING
2828

29-
if(fabs(result_type(val)) > 0.75)
29+
if(fabs(result_type(val)) > result_type(0.75))
3030
return sqrt(1 + result_type(val)) - 1;
3131
return boost::math::expm1(boost::math::log1p(val, pol) / 2, pol);
3232
}

0 commit comments

Comments
 (0)