summaryrefslogtreecommitdiff
path: root/boost/math/special_functions/sin_pi.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/math/special_functions/sin_pi.hpp')
-rw-r--r--boost/math/special_functions/sin_pi.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/boost/math/special_functions/sin_pi.hpp b/boost/math/special_functions/sin_pi.hpp
index 16aed51d2b..ae6b3e7442 100644
--- a/boost/math/special_functions/sin_pi.hpp
+++ b/boost/math/special_functions/sin_pi.hpp
@@ -53,10 +53,17 @@ T sin_pi_imp(T x, const Policy& pol)
} // namespace detail
template <class T, class Policy>
-inline typename tools::promote_args<T>::type sin_pi(T x, const Policy& pol)
+inline typename tools::promote_args<T>::type sin_pi(T x, const Policy&)
{
typedef typename tools::promote_args<T>::type result_type;
- return boost::math::detail::sin_pi_imp<result_type>(x, pol);
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(boost::math::detail::sin_pi_imp<value_type>(x, forwarding_policy()), "cos_pi");
}
template <class T>