Skip to content

Commit

Permalink
Fix casting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Jun 19, 2023
1 parent e62a284 commit 77a4fd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/boost/math/special_functions/chebyshev.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ template <typename T, typename std::enable_if<!std::is_arithmetic<T>::value, boo
T expt(T p, unsigned q)
{
using std::pow;
return static_cast<T>(pow(p, q));
return pow(p, q);
}

template<class Real, bool second, class Policy>
Expand Down
2 changes: 1 addition & 1 deletion include/boost/math/special_functions/sqrt1pm1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ inline typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy
typedef typename tools::promote_args<T>::type result_type;
BOOST_MATH_STD_USING

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

0 comments on commit 77a4fd9

Please sign in to comment.